V Lookup Wrong info

shaftdx

Board Regular
Joined
Aug 20, 2018
Messages
138
Office Version
  1. 2011
Platform
  1. MacOS
Hello I have a problem with the Vlookup feature, Kinda...I figured it out how to get the information in there but it is grabbing the wrong Info. I will start off by explaining the kind of information I have going on here.

I work for a school bus company and we do alot of trips. I want to be able to click on the date of a trip and all the corresponding data for that trip will autofill in the trip sheet (Pick up location, destinations, the driver,times Ect.) and I got this to WORK! however I ran into a problem when there is more than one trip on the same day. For example lets say there are 5 trip going out on 9/14/18 ranging from B15 to B20 on the spread sheet. If I click on B15 the corresponding data will show up for B20. but it there is only one trip the next day and I put in B21 it works perfectly.

<style type="text/css">p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Lucida Grande'}span.s1 {color: #0057d6}</style>=VLOOKUP(B6,trips!$B$2:trips!$AE$2014,25,FALSE)
is the formula I am using

At first I thought it was just the dates that are the problem that it recognized one date as all dates in that section but I changed the lookup spot to something other than the date and the same thing happened
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Your formula looks wrong, try this (untested)

=VLOOKUP(B6,trips!$B$2:$AE$2014,25,FALSE)

VLOOKUP will only return one result.

If you're looking to produce a list without blanks in the list you need a different formula.
If this is what you're after post some example data

Post a sample spreadsheet with cell references and expected results, remove any sensitive data, create a mockup example if necessary.
You cant attach files on this forum. There are tools on this forum for adding small spreadsheet images

https://www.mrexcel.com/forum/about-board/508133-attachments.html
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top