advanced VLookup

biglb79

Active Member
Joined
Oct 17, 2007
Messages
299
I wasn't sure what subject to use, but I'm hoping I can describe what I'm trying to do and someone can help.

I'm trying to populate a cell in columns AG or AH. It will depend on what the value is during the search.

I want to lookup the value in cell Q3 based on the information on the accrual lookup tables tab columns M:O. the values to match cell Q3 are located in column M. then if column N says Deduction code I want it to populate Cell AH3 with the value in column O on the accrual lookups tab and then have column AG stay blank. if the value in column N says Workday Deduction Code then I want the value to fill cell AG and have AH be blank

basically I'm trying to lookup values in columns AG and AH based on what's in column Q. I want it to use the values in column O on the other tab but decide what column to populate based on column N

I really hope this makes sense and someone can help!
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Hi,

For AG3 you could try:
Excel Formula:
=IF(VLOOKUP(Q3,'accrural lookup'!M:O,2,0)="Workday Deduction code",VLOOKUP(Q3,'accrural lookup'!M:O,3,0),"")
And for AH3 you could try:
Excel Formula:
=IF(VLOOKUP(Q3,'accrural lookup'!M:O,2,0)="Deduction code",VLOOKUP(Q3,'accrural lookup'!M:O,3,0),"")
 
Last edited:
Upvote 0
Solution
Like this?

Book4
MNOPQAGAH
1ListCodeValues
2ax1
3bDeduction code2d4 
4cy3e  
5dWorkday Deduction Code4b 2
6ez5
7
Sheet7
Cell Formulas
RangeFormula
AG3:AG5AG3=IFERROR(IF(VLOOKUP(Q3,$M$2:$O$10,2,0)="Workday Deduction Code",VLOOKUP(Q3,$M$2:$O$10,3,0),""),"")
AH3:AH5AH3=IFERROR(IF(VLOOKUP(Q3,$M$2:$O$10,2,0)="Deduction Code",VLOOKUP(Q3,$M$2:$O$10,3,0),""),"")
 
Upvote 0
Hi,

For AG3 you could try:
Excel Formula:
=IF(VLOOKUP(Q3,'accrural lookup'!M:O,2,0)="Workday Deduction code",VLOOKUP(Q3,'accrural lookup'!M:O,3,0),"")
And for AH3 you could try:
Excel Formula:
=IF(VLOOKUP(Q3,'accrural lookup'!M:O,2,0)="Deduction code",VLOOKUP(Q3,'accrural lookup'!M:O,3,0),"")
perfect! thank you so much!
 
Upvote 0

Forum statistics

Threads
1,214,823
Messages
6,121,779
Members
449,049
Latest member
greyangel23

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