Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default IF FORMULA....

Im having a problem trying to check the result via IF....

ok heres how it goes....

I have 2 checks that i need to do....

First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...

This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))


Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")

It seems that i cant do it...

Is it not possible to have an IF Function to check an IF Result?

I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default IF FORMULA....

Why not do it in one cell.

Creat a table of your results in this case a17 to B21:-

22 1
27 2
32 3
36 4
41 5


Then in B1 use

=VLOOKUP(A1,A17:B21,2,TRUE)

You don't say what happens for <22 so the formula returns an error.

Mike



"mohamadhafiz" wrote:

Im having a problem trying to check the result via IF....

ok heres how it goes....

I have 2 checks that i need to do....

First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...

This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))


Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")

It seems that i cant do it...

Is it not possible to have an IF Function to check an IF Result?

I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default IF FORMULA....

The < 22 condition should return a 0, which Mike's solution will do if
you add
0 0 <--add this to the top of his list
22 1
27 2
etc...

On Jun 26, 2:09 pm, Mike H wrote:
Why not do it in one cell.

Creat a table of your results in this case a17 to B21:-

22 1
27 2
32 3
36 4
41 5

Then in B1 use

=VLOOKUP(A1,A17:B21,2,TRUE)

You don't say what happens for <22 so the formula returns an error.

Mike

"mohamadhafiz" wrote:
Im having a problem trying to check the result via IF....


ok heres how it goes....


I have 2 checks that i need to do....


First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...


This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))


Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")


It seems that i cant do it...


Is it not possible to have an IF Function to check an IF Result?


I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default IF FORMULA....

On Jun 26, 1:56 pm, mohamadhafiz wrote:
Im having a problem trying to check the result via IF....

ok heres how it goes....

I have 2 checks that i need to do....

First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...

This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))

Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")

It seems that i cant do it...

Is it not possible to have an IF Function to check an IF Result?

I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....


Try this instead:
=IF(A141,5,IF(A135,4,IF(A131,3,IF(A126,2,IF(A1 21,1,0)))))

You don't need to test if a number is greater than or less than a
number if you test in descending order. The IF will find the first
correct match and then exit out.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default IF FORMULA....

you have quotes around the results of your if statement. so "5" as the result in
b1 is not going to = 5 in the formula in c1

remove the quotes
=IF(A1=0,0,IF(A141,5,IF(AND(A1<=41,A1=36),4,IF(A ND(A1<=35,A1=32),3,IF(AND(A1<=31,A1=27),2,IF(AND (A1<=26,A1=22),1,0))))))

--


Gary


"mohamadhafiz" wrote in message
...
Im having a problem trying to check the result via IF....

ok heres how it goes....

I have 2 checks that i need to do....

First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...

This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))


Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")

It seems that i cant do it...

Is it not possible to have an IF Function to check an IF Result?

I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default IF FORMULA....

Apologies you wanted a zero for <22 so:-

=IF(ISERROR(VLOOKUP(A1,A17:B21,2,TRUE)),0,VLOOKUP( A1,A17:B21,2,TRUE))

Mike

"mohamadhafiz" wrote:

Im having a problem trying to check the result via IF....

ok heres how it goes....

I have 2 checks that i need to do....

First is if a number is a certain Range... if it is... then it will be given
a certain Grade 1 - 5 the command is as FOLLOWs...

This is what i have in my B1 Cell....
=IF(A1=0,"0",IF(A141,"5",IF(AND(A1<=41,A1=36),"4 ",
IF(AND(A1<=35,A1=32),"3",
IF(AND(A1<=31,A1=27),"2",IF(AND(A1<=26,A1=22),"1 ","0"))))))


Next i need to check... if the person got more than Grade 3...
so in C1 i have
=IF(B1=3,"GOLD","SILVER")

It seems that i cant do it...

Is it not possible to have an IF Function to check an IF Result?

I really hope someone is able to assist me... Im very lost... Preferably if
i can get someone via MSN Messenger to discuss would be even greater....

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
Build excel formula using field values as text in the formula val kilbane Excel Worksheet Functions 2 April 18th 07 01:52 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"