Index/Match "" vs 0 for blank cells

tjlaser shepard

New Member
Joined
Jun 1, 2016
Messages
7
What factors determine whether the index/match function combination to returns “” rather than “0” when the referenced cell is blank?

I set up a spreadsheet that tracks changes to expected project revenue by month. The reference table [NRSDATA] has project numbers as the rows [SREFROWS] and months as the columns [SREFCOLS]. If a project has no changes for a given month, that cell is left blank in the reference table. On another sheet, I list all the months in SREFROWS in column “A” and the user enters the project number in B1. Next to each month in in column B (starting with B3) I have the following formula:

=IFNA(INDEX(NSRDATA,MATCH($B$1,SREFROWS,0),MATCH(A3,SREFCOLS,0)),"")

If there is no change for that project in that month, the reference cell will be blank and this formula should return “”. Based on what the index/match formula returns, I have this formula in column E:

=IF(ISNUMBER(B3),1,"")

And then a macro that hides all the rows that have blank cells in column E.
All of this worked perfectly for the historical data, but all of the new projects I have added to the reference table since setting all of this up return “0” for every month where the reference is blank. Does anyone know why this would/could be the case?

Thanks
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Hi
Welcome to the board

Maybe the problem is the word "blank" in your post.

I don't understand exactly that word in your post.

It seems you are using the word blank for 2 different things:

- an empty cell (the cell has nothing)
- a cell with an empty string (the cells has a string with 0 characters)

In the first case it would return 0 and in the second case it would return "" (an empty string)

Please clarify.
 
Last edited:
Upvote 0
Thanks PGC. By blank cell, I mean cell with nothing in it. every cell in the reference table which is at the intersection of a project and a month with no activity in it is an empty cell. This is why I am puzzled by the fact that the newer projects are returning "0" for inactive months rather than "". I have run some tests in the reference table to compare the empty cells for the affected projects with empty cells in the projects that are functional. I could not find any discernable difference between the two; in all the examples I tried ISBLANK returned a TRUE value and LEN returned 0. Is there another test I should try? Based on your answer it sounds like the blank cells in the affected projects might have somehow ended up with empty strings in them. If that is the case, is there another way to clear out the string other than selecting the cell and hitting delete (which I have tried)? Thanks again.
 
Upvote 0
Hi

If ISBLANK() returns TRUE then the cell is empty.

In this case if all the cells are empty I don't know what could be the problem.

Can you post a small sample of data and the formula you use so that we can test?
 
Upvote 0
Hi,

Here is an example of what the "Sales REF" sheet looks like. I have color coded the named ranges and included a key:


Excel 2013 32 bit
ABCDEFGHIJ
1Mar-16Apr-16May-16namedNSRDATA
2961211-003617000rangeSREFCOLS
3keySREFROWS
4SOV
5961212-00400091500
6Design OnlyFull Contract
7Design add [$4,800], Mobilization [$23,000], VSC Installation [$63,700]
8961213-00195000
9
10SOV
11961214-0035000
12Design LOI
13
14961215-00835270
15
16SOV
17961216-00342400
18
19SOV
20961217-00180400
21
22SOV
Sheet1
<p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120"/>

and here is an example of what the sales history sheet looks like. Formulas are listed off to the side:


Excel 2013 32 bit
ABCDEFGHIJKLMNOPQ
24ABCDEFormulas
251project #:fig 1.=IFNA(INDEX(NSRDATA,MATCH($B$1,SREFROWS,0),MATCH(A3,SREFCOLS,0)),"")
262MONTHAMOUNTSALE TYPEDESCRIPTIONFilterfig 2.=IFNA(OFFSET(INDEX(NSRDATA,MATCH(B$1,SREFROWS,0),MATCH(A3,SREFCOLS,0)),1,0),"")
273Mar-16[fig 1.][fig 2.][fig 3.][fig 4.]fig 3.=IFNA(OFFSET(INDEX(NSRDATA,MATCH(B$1,SREFROWS,0),MATCH(A3,SREFCOLS,0)),2,0),"")
284Apr-16fig 4.=IF(ISNUMBER(B3),1,"")
295May-16
Sheet1
<p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #BBB;border-top:none;text-align: center;background-color: #DAE7F5;color: #161120">
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,317
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top