Look Ups Next Cells

trainer75

New Member
Joined
Jun 11, 2015
Messages
33
Hi,

Does anyone have a clue to why my look up is not find the correct data?

On my spreadsheet in column D I have a list of media (ie CAGE, PALLET, TOTE etc) and in column E I have a cumber which references what row they are in on another tab, I then pick which media by a drop down box and then I want the number to show in reference to the row.

Example
Column D Column E
CAGE 4
PALLET 5
TOTE 6
BARREL 7
TROLLEY 8

A7 is a drop down box where I can choose the media

The formula I have is
=LOOKUP(A7,D1:D7,E1:E7)


Unfortunately the numbers don't match the media and I cant fathom out why, so if I want to select barrel I want the number 7 to show.

Hope you can help :)
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Use Vlookup() instead of Lookup() since it seems that you are not familiar with Lookup() function.

=VLOOKUP(A7,D1:E7,2,0)

Or

=LOOKUP(2,1/(D1:D7=A7),E1:E7)
 
Upvote 0
From help
For the LOOKUP function to work correctly, the data being looked up must be sorted in ascending order. If this is not possible, consider using the VLOOKUP, HLOOKUP, or MATCH functions
 
Upvote 0

Forum statistics

Threads
1,215,348
Messages
6,124,425
Members
449,157
Latest member
mytux

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