Multiple Nested IF functions if cells are blank

Copper Contributor

Hello, 

 

I am trying to return 3 different conditions/status based on the value of 3 different cells. 

 

I have 3 blank cells in excel and i want the status to change based on values being entered into other cells. 

 

E.g. If a value is entered in cell A1 the status in cell D1 = "New Request", If a value is entered in cell B1 = "In Progress" and if a value is entered in Cell C1 = "Complete"

3 Replies

@Adelee  I think I get what you want and there are a number of ways to do it.  Part of it will depend on possible "error" cases.  Is it possible someone will fill in cell C1 without A1 or B1?  If so what should be displayed?  Also some people have preferences based on 'readability'.  So here is a nice simple formula that basically chooses the state based on how many of those cells are not blank:

=CHOOSE(SUM(--NOT(ISBLANK(A1)),--NOT(ISBLANK(B1)),--NOT(ISBLANK(C1)))+1,"","New Request","In Progress","Complete")

but that may not handle those error cases the way you want.  So here is using IFS statement going from right to left and once a value is found it uses that state:

=IFS(NOT(ISBLANK(C1)),"Complete",NOT(ISBLANK(B1)),"In Progress",NOT(ISBLANK(A1)),"New",TRUE,"")

if you will only be looking for text in cols A,B,C then you could just check if the cell is >"" and I actually like to use >" " because sometimes people hit <space> to 'clear' a cell instead of delete.  Also, here is cascading IF statement in case you don't have the IFS or just find it cleaner:

=IF(C1>" ","Complete",IF(B1>" ","In Progress",IF(A1>" ","New","")))

 

@mtarlerThank you so much. The first formula does exactly what i wanted.  

@Adelee 

As variant

=IFNA(LOOKUP(2,1/(A1:C1<>""),{"New Request","In Progress","Complete"}),"no status")