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

Sorry to keep asking for help. I used the following

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

Still recieving #N/A

Do you think I am recieving an error since G9 has a formula
=ROUND((($I$1-J8)-185)/(365),0) instead of an actual number?

"Duke Carey" wrote:

My formula was offered if the ONLY values possible were 240 and 600. In that
case, if it isn't 240, it MUST BE 600. Since there is another possibility,
use this instead:

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

Given the error you got, I'd say that the lookup value didn't appear in your
lookup table. You will get the #N/A error if you use FALSE or zero as the
4th argument to VLOOKUP. Without that argument, VLOOKUP gives you an
approximate answer.

"cwilliams" wrote:

"The formula you typed contains and error" info box.

The value in A2 will either be 240 or 600. If it is not either of those two
numbers then it should be left blank. It is an actual number manually
entered.

I tried yours and recieved #N/A. I dont see in your formula if 240 do this
and if 600 do that. Maybe I am missing something?



"Duke Carey" wrote:

What kind of error messages? What is A2 doesn't equal 240 OR 600? Is the
value in A2 a text presentation of a number, or is it really a number? If it
is text, you'll need to test for A2="240"

If the only 2 POSSIBLE values in A2 are 240 & 600 you can try

=VLOOKUP($G9,if(a2=240,Rates!$A$1:$B$11,rates!$C$1 :$D$11),2,0)


"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