# Select Vehicle Code,last date in the month,oldest time on that date return Amount value

1. ## Select Vehicle Code,last date in the month,oldest time on that date return Amount value

I have four columns as shown below
Two vehicle codes 56035 and 78733
create a formula that can return the amount consumed by each car on the oldest date in the month,with the oldest time on that very date.

2. ## Re: Select Vehicle Code,last date in the month,oldest time on that date return Amount valu

You should show some expected outcomes with this sort of question.

See if this is what you want. I put the Card No in H2...
 H 2 56035 3 1576200

H3=INDEX(\$E\$3:\$E\$24,MATCH(MIN(IF(\$B\$3:\$B\$24=H2,C3:C24)),\$C\$3:\$C\$24,0))
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.

3. ## Re: Select Vehicle Code,last date in the month,oldest time on that date return Amount valu

Say in G3:G4 you put your Card nums, in H3 put the following ARRAY formula (activate with CTRL+SHIFT+ENTER), then drag down to H4:
Formula:
`Please Login or Register  to view this content.`

Also done in attached file.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1