Is it possible....

pholt33

Board Regular
Joined
Jan 4, 2005
Messages
202
Office Version
  1. 365
Platform
  1. Windows
to put a vlookup inside of a vlookup? Here is my original formula that works just fine:
=IF(ISERROR(VLOOKUP(C2,'L:\ACM\Departments\Performance\Incentive Comp\2008\April\[Acqdispic.xls]MGR-IC'!$E:$X,8,FALSE)),0,(VLOOKUP(C2,'L:\ACM\Departments\Performance\Incentive Comp\2008\April\[Acqdispic.xls]MGR-IC'!$E:$X,8,FALSE)))/100

What I want to do is set up another vlookup that would automatically change the month portion of the above formula based on an input cell. So if someone puts 5/31/2008 in a cell, a =month() formula returns "5", which tells another vlookup formula to find 5 in the list of months and return May. I want that May to replace the April in the formula up above. I have everything working except that last part where it changes the link reference.

Is this possible to do?
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
You would normally do that by using INDIRECT,

INDIRECT("'L:\ACM\Departments\Performance\Incentive Comp\2008\"&TEXT(A1,"mmmm"&"\[Acqdispic.xls]MGR-IC'!$E:$X")

but that won't work with a closed workbook, so you will need to get and use Laurent Longre's MOREFUNC dll or Harlan Grove's Pull function.
 
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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