Vlookup formula to loop between numbers in a coloumn

mmlabanca

New Member
Joined
Oct 1, 2015
Messages
1
Hi,
I am working on a formula for which I think I might need a macros. I have a vlookup formula that looks up a value in column D, and matches the returned value (column E) with column B. If there is a match, the value in column C is returned. However, the vlookup needs to be applied to several values, and if I write every value down manually, the formula will be extremely lengthy.

Here is a sample of the formula for just 2 values in column A:

=IF(VLOOKUP(1,$D$2:$E$144,2,FALSE)=B2,C,IF(VLOOKUP(2,$D$2:$E$144,2,FALSE)=B2,C2,""))

Instead of having lookup_values of 1, 2, etc in the vlookup formula... I want it to refer to column D's values (1 to 144)...

I am not sure how to do this... The "IF" statement would be really lengthy if I continue with lookups for values 1-144...

Thank you very much for any guidance you could give me.

Mercedes :):)
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi Mercedes,

so basically you're trying to look up the values of B2 in column E, right? Why don't you put your "found values (C and C2 in your example formula) in column F and make a simple VLOOKUP with columns E and F?

=VLOOKUP(B2,$E$2:$F$144,2,FALSE)

Ciao,

Koen
 
Upvote 0

Forum statistics

Threads
1,223,250
Messages
6,171,036
Members
452,374
Latest member
keccles

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