Fetch Data automatically in a single cell

hello forum members.
i have truck running data in km book sheet and outward book sheet as attached. i created a pivot table with sorted data in sheet8. next to pivot table i want to fetch data of column 1 in km book sheet after filtering and sorting data based on vehicle number and km the vehicle ran. i did one myself manually but its too complex to do. i also recorded macro for reference what to filter. after filtering i just entered data in cell i wanted to. but i want a vba code for this. how will i be able to know where my trucks operated between the two kilometeres in pivot data table. PLease help...

AttachmentSize
excel filter problem.xlsm365.39 KB