Null Value in INDEX MATCH (1 Viewer)

simon4amiee

Registered User.
Local time
Today, 01:59
Joined
Jan 3, 2007
Messages
109
=IF((INDEX(InsertDataHERE!A45:AB45,MATCH(A45,A45,FALSE),6))=(INDEX(ReferenceData!49:49,MATCH(A45,A45,FALSE),12)),"OK","Review")

Hi guys the above formular works great, however I need to add to this at the start asking if INDEX(InsertDataHERE!A45:AB45,MATCH(A45,A45,FALSE),6 Is Null then "Review" and then carry on with the above statement. I have tried al lsorts to no avail.
 

Brianwarnock

Retired
Local time
Today, 01:59
Joined
Jun 2, 2003
Messages
12,701
Without the spreadsheet it is not possible to test and also I have no idea what you have tried as you did not say. There is probably more than one way to do this but have you tried a simple nested If

Code:
=If(Isblank(INDEX(InsertDataHERE!A45:AB45,MATCH(A45,A45,FALSE),6),"Review",IF((INDEX(InsertDataHERE!A45:AB45,MATCH(A45,A45,F ALSE),6))=(INDEX(ReferenceData!49:49,MATCH(A45,A45 ,FALSE),12)),"OK","Review")

Brian
 

Rx_

Nothing In Moderation
Local time
Yesterday, 18:59
Joined
Oct 22, 2009
Messages
2,803
This might be worth looking into. Sometimes formatting the output can simplify the formula.

=IFERROR(INDEX($C$:$C$,MATCH($A1,$A$:$A$,0)),""). However, this formula return a value "0" instead of "blank". That can be controlled with cell formatting.

Assuming the cell where you're displaying the answer is set to a 'General' number format then you can change this, by right clicking on the cells and choosing 'Format Cells' and going to Custom and changing the Number Format to General;-General; (note the semicolon after General)

That way although the cell will still contain a zero, it will display as a blank cell.

A guide on setting multiple Custom formats in a cell (using the semicolon) can be found here:
http://exceltactics.com/definitive-guide-custom-number-formats-excel/

If you find a way to put zero into cells that are null, then use Excel to fill in the zero (or blanks) with text. The same can be done for other numbers.
https://www.ablebits.com/office-addins-blog/2014/05/02/fill-blanks-excel/

If your data is small, the IF statements will do fine.
If the data is say 10,000 records and there are multiple IF statements say on 20 columns, that is a lot of IF processing. (20 x 10,000).
By using formatting in multiple steps, the speed can increase.

I often pre-qualify data from SQL Server with TSQL formulas, then dump tens of thousands of records into Excel using VBA automation. These formulas can take time in large sets. Once done, the filtering by the end users can help them identify trends or quality issues. So, I like to let Excel do the bulk work when possible rather then an If statement at a time.
If your only using one page of data, stick with the IF statements.
 

Users who are viewing this thread

Top Bottom