IF ELSE in excel - check if cell is null / empty

I do not program in VBA. This is a simple Excel spreadsheet. Essentially, I have a formula that finds the lowest price in a range of cells and returns its corresponding column name. It is working fine. However, some ranges do not matter at all. Thus, the cell that is populated with the column heading displays # N / A in this case.

What I need to do is check if this is happening. If the result is # N / A, I want the cell to display "No values ​​for reference." I thought something like:

=IF(CELL != NULL, Display_Header, ELSE "No Bids to Reference") OR =IF(CELL = NULL, No Bids to Reference", ELSE Display_Header) 

I tried both NULL and # N / A, but I'm not sure how Excel handles these situations. That is how Excel handles # N / A returns.

 IF(INDEX($D$1:$M$1,MATCH(MIN(D3:M3),D3:M3,0))= "#N/A","No Bids To Reference", INDEX($D$1:$M$1,MATCH(MIN(D3:M3),D3:M3,0))) 
+4
source share
2 answers

Since you have only one calculation here, you can simply use IFERROR :

 =IFERROR(INDEX($D$1:$M$1,MATCH(MIN(D3:M3),D3:M3,0)),"No Bids To Reference") 

IFERROR checks to see if the expression evaluates to an error (maybe #N/A , #VALUE! Or #REF! ). If true, evaluate the next expression, otherwise return the first expression.

+8
source

I would CTL + G, Special and replace the values ​​of all cells with formula errors.

+2
source

Source: https://habr.com/ru/post/1485818/


All Articles