Reputation: 223
I need to figure out how to find the date difference between two dates (started & sent out). My problem is I don't know how to do this with a formula when the data is spread over several rows. The difference is where the job number is the same in Column A as hi-lited in the screenshot. I don't know where to begin. Each job can have anywhere from two to ten rows of data and I need to get the total job time.
Upvotes: 0
Views: 999
Reputation: 35915
Assuming that the data is in chronological order, the "sent out" row would always be after the "started" row, right? In that case, a lookup formula for the first occurrence of the job number will return the correct value for the start date.
Put this into cell M1 and copy down:
=if(K1="SENT OUT",L1-Vlookup(A1,$A$1:$H$1000,8,0),"")
Adjust the row numbers in the Vlookup to your data range and replace commas with semicolons if your Excel uses semicolons between formula parameters.
Upvotes: 1