X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Nested If, Any Version    
post Sep 16 2019, 01:31 PM

Posts: 1,180
Joined: 19-February 08

Hello Friends;
is there any difference between using this code and if i use nested if
=IF(A1<=49,"Fail","")&""&IF(AND(A1>=50,A1<=65),"good","")&""&IF(AND(A1>=65,A1<=75),"very//","")&""&IF(AND(A1>=75,A1<=85),"very good","")&""&IF(A1>=85,"Excellent","")

I would like to Thank you for your help
Go to the top of the page
post Sep 16 2019, 01:50 PM

Posts: 1,315
Joined: 25-January 16
From: The Great Land

The output should be same. Should not have both <=85 as well as >=85 (85 will always match the first one), pick one for clarity.

=IF(A1<=49,"Fail", IF(A1<=65,"good", IF(A1<=75,"very//", IF(A1<=85,"very good", IF(A1>85,"Excellent","")))))

This post has been edited by June7: Sep 16 2019, 01:55 PM

Attachments Manager is below the edit post window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Go to the top of the page
post Sep 18 2019, 06:35 AM

Posts: 180
Joined: 11-October 18

Nested IF would be more efficient. You could also use a LOOKUP, either with a table or using array constants:

=LOOKUP(A1,{0,50,65,75,85},{"Fail","good","very//","very good","Excellent"})
This post has been edited by Debaser: Sep 18 2019, 06:37 AM
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    7th April 2020 - 02:41 AM