View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Michele
 
Posts: n/a
Default If Function containing VLook up

Steve,

I've tried this and keep getting a #N/A result. Below is my actual worksheet

Col A Col B Col C Col D Col E Col F
ID Def % Ttl Bonus Bonus Amt Year Def. Amt
123 ????? 15000 (1-B2)*C2 2005 B2*C2
345 ????? 15000 (1-B2)*C2 2006 B2*C2
789 ????? 15000 (1-B2)*C2 2006 B2*C2
567 ????? 15000 (1-B2)*C2 2005 B2*C2

This is my named table (DC_Percent) below:

Col I Col J Col K
ID 2005 % 2006 %
567 15% 20%
345 10% 15%
789 25% 10%
123 20% 15%

I'm trying to solve Col B with the following:

If(E2=2005,VLOOKUP(A2,DC_Percent,2,False),VLOOKUP( A2,DC_Percent,3,False))

But all I get in B2 is #n/a, when I should be getting 20%, which is needed
for the other functions in differing columns. Can you see what I'm doing
wrong?

I'm grateful for what ever help you can give?

"SteveG" wrote:


Michelle,

This worked for me.

=IF(B2=2005,VLOOKUP(A2,Deferred_Perctg,2,FALSE),VL OOKUP(A2,Deferred_Perctg,3,FALSE))

HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=491153