Thread: Nested Formula?
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
cwilliams cwilliams is offline
external usenet poster
 
Posts: 17
Default Nested Formula?

I recieved a "0".

Here is the actual formula that I used

IF($J100,IF($J9=240,VLOOKUP($G9,Rates!$A$3:$B$11, 2,0),IF($J9=600,VLOOKUP($G9,Rates!$D$3:$E$11,2,0), 0)),0)

J10 has a value of 0, 1, 2,3 or 4
J9 has a value of 240, 600 or "Decline"
G9 has an age formula in it =ROUND((($I$1-J8)-185)/(365),0)

Based on the age that is in G9 and the number that is in J9 and J10 will
determine the rate used in A3:B11 and D3:E11

I hope I am explaining myself clearly.


"Pete_UK" wrote:

I think you have missed an IF from the middle, and your second VLOOKUP
is missing a column_ref. As the A20 condition applies to both, you
might like to try this variation:

=IF($A20,IF($A1=240,VLOOKUP($G9,Rates!$A$1:$B$11, 2,0),IF($A1=600,VLOOKUP($G9,Rates!$C$1:$D$11,2,0), 0)),0)

I have assumed you want a result of 0 if A2 is not greater than 0 (last
parameter).

Hope this helps.

Pete

cwilliams wrote:
I am trying to create a formula and I am stuck.

For example:

If cell A1 is "240" then use the rates from the "Rates!" sheet cells
A1!:B11!, If cell A1 is "600" then use the rates from the "Rates!" sheet
cells C1!:D11!

All of this depends on what is in cell A2

The formula I used was:

IF$A1=240,IF($A20,VLOOKUP($G9,Rates!$A$1:$B$11,2) ),$A1=600,if($A20,vlookup($G9,rates!$C$1:$D$11,0) ))

Is it possible to write a formula like this? I just keep getting error
messages. Any suggestions would be greatly appreciated