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

#### richanor

##### Active Member
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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

#### AlphaFrog

##### MrExcel MVP
Vlookup can't lookup to the left, but Index\Match can.

=INDEX(B5:B8,MATCH(C5,C5:C8,0))

Last edited:

#### tc200505

##### New Member
The formula below should do the trick:

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

#### richanor

##### Active Member
excellent - thankyou both.

Rich

Replies
6
Views
372
Replies
23
Views
932
Replies
9
Views
240
Replies
14
Views
443
Replies
2
Views
344

1,195,589
Messages
6,010,609
Members
441,558
Latest member
lambierules

### 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.

### Which adblocker are you using?

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

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