Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default i want to give more than 6 condition by using if statement

when i am given the below condition it is given me an error, please help me
how to do it for the students details.

=IF(C4<35,"Fail",IF(D4<35,"Fail",IF(E4<35,"Fail",I F(F4<35,"Fail",IF(G4<35,"Fail",IF(H4<35,"Fail",if( j4<45,"Pass",if(j4<60,"Second
Class",if(j4<75,"First Class","Distinction")))))))))
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default i want to give more than 6 condition by using if statement

On Sat, 14 May 2005 10:16:04 -0700, Sushil
wrote:

when i am given the below condition it is given me an error, please help me
how to do it for the students details.

=IF(C4<35,"Fail",IF(D4<35,"Fail",IF(E4<35,"Fail", IF(F4<35,"Fail",IF(G4<35,"Fail",IF(H4<35,"Fail",if (j4<45,"Pass",if(j4<60,"Second
Class",if(j4<75,"First Class","Distinction")))))))))


A different approach, using VLOOKUP, would work better.

If I understand your formula, you are computing:

1. If any cell in the range C4:H4 is < 35, then "Fail".
2. Otherwise, compute a response based on the contents of J4.

That being the case, the following formula will accomplish that:

=IF(COUNTIF(C4:H4,"<35"),"Fail",VLOOKUP(J4,
{35,"Pass";45,"Second Class";60,"First Class";75,"Distinction"},2))

The array constant can also be placed in a two column vertical table, and
referred to by a Name or Cell Reference (e.g. X1:Y4):

35 Pass
45 Second Class
60 First Class
75 Distinction



--ron
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default i want to give more than 6 condition by using if statement

I think you have exceeded the IF statement speed limit! Strictly as
a footnote, there is a limited number of IF statements that you can
string together and when you exceed that limit (which is nowhere near
your logic limit), they just don't work. A working knowledge of logic
statements can accomplish some amazing tasks; Ron reminds us, however,
that there are much more elegant solutions.
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
To give back ground colour for entire row on certain condition pol Excel Discussion (Misc queries) 6 May 22nd 09 11:41 AM
Condition Statement Django Excel Discussion (Misc queries) 5 August 26th 05 06:59 PM
Statement to give focus to a specific control on a UserForm? Fred Holmes Excel Programming 3 December 20th 04 07:56 PM
Condition Statement Help?? CWit Excel Programming 7 March 3rd 04 07:16 PM
Condition Statement Stel Excel Programming 4 December 9th 03 12:52 PM


All times are GMT +1. The time now is 04:43 PM.

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

About Us

"It's about Microsoft Excel"