Get values to the left of VLOOKUP.

jsuvman58

New Member
Joined
Jan 14, 2012
Messages
11
I have a pivot table that can not be changed. I am using VLOOKUP on another sheet to create a different form. Is there a way to get data from the “Left” of the value that the VLOOKUP formula finds? </SPAN>

Here is a example I created. Let’s say VLOOKUP is using the “Employee ID” as its reference. How do I get it to return the “Department”? It would be nice if you could just tell it minus one (-1) and it would work. </SPAN>

I know it can be done with a macro but was wondering if there was an easier way? Maybe with the INDEX or MATCH function? I am not that familiar with these. </SPAN>

=VLOOKUP(34, B2:D5, 3, FALSE) – This would return the address of Jim Kim as you know. </SPAN>
Department</SPAN>
Employee ID</SPAN>
Name</SPAN>
Address</SPAN>
Sales</SPAN>
34</SPAN>
Jim Kim</SPAN>
Anywhere</SPAN>
Production</SPAN>
45</SPAN>
John Doe</SPAN>
Anywhere</SPAN>
Accounting</SPAN>
32</SPAN>
Jane Hatty</SPAN>
Anywhere</SPAN>
Operations</SPAN>
67</SPAN>
Joe Turner</SPAN>
Anywhere</SPAN>

<TBODY>
</TBODY>
</SPAN>
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
You need INDEX/MATCH like this

Excel Workbook
ABCDEF
1DepartmentEmployee IDNameAddressSales
2Sales34Jim KimAnywhere
3Production45John DoeAnywhere
4Accounting32Jane HattyAnywhere
5Operations67Joe TurnerAnywhere
Sheet2
 

jsuvman58

New Member
Joined
Jan 14, 2012
Messages
11
Thanks VoG. I was able to use a variation of your formula and it worked great. I now understand the Index and Match a little better. I will now take a look at the option that Firefly2012 gave.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,910
Messages
5,598,803
Members
414,260
Latest member
joishe

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