Can you use a negative number in the column field of a VLOOKUP?

richanor

Active Member
Joined
Apr 8, 2006
Messages
291
Hi

I am trying to do a vlookup, but the value I want to return is to the left of the table array. I can see the obvious problem that a VLOOKUP looks for a match in the first column of the defined range - but I was wondering if there was any way around this?

In case I haven't explained this very well (or incase there is an alternative solution not using VLOOKUP), what I am trying to do is:

I want to look at the value in cell C5. If it is a "1", I want "TRA" to appear in cell AC5. If it is a "2", I want "DUO" to appear in cell AC5. If it is a "3" I want "AZA" to appear in AC5. If it is a "4", I want "SYS" to appear in AC5.

Currently, the TRA, DUO, AZA, SYS are in the range B5:B8, hence the question about whether

Code:
=VLOOKUP(C5,C5:C8,-1,FALSE)

would work. Any help would be greatly appreciated,

Rich
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

tc200505

New Member
Joined
Mar 7, 2010
Messages
28
The formula below should do the trick:

=IF(C5=1,B5,IF(C5=2,B6,IF(C5=3,B7,IF(C5=4,B8))))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,522
Messages
5,837,838
Members
430,517
Latest member
chessypack86

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
Top