2

Here's the set up to the problem I'm having.

I have a column of dates and a column of truck numbers. I'm trying to use VLOOKUP to find what truck numbers correspond to the dates. There are multiple dates and they're in the MM/DD/YYYY format. A date will have multiple truck numbers attached to it. I've attached a picture of the data I'm wanting to use.

My question is how would I go about using VLOOKUP with the dates in column B as the search criteria? What I have so far is: =VLOOKUP("3/24/2021", B:E, 4, 0).

enter image description here

1

In the formula, =VLOOKUP("3/24/2021", B:E, 4, 0), for Google Sheets the first parameter is a text value, not a date. Instead of "3/24/2021" you could use DATE(2021,3,24), by the other hand, VLOOKUP will return only the first match. If you want all the the Trucks numbers for a certain date instead of VLOOKUP use FILTER or QUERY.

NOTE: To return a date value instead of DATE you might also use TO_DATE. For details look at the function helper is shown when typing functions in a formula.

Related

1
  • 1
    Thanks! I used QUERY like you suggested and it's much better suited for my needs! Jun 16 at 14:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.