Dynamic named range with blanks (but still has formula in the cell)

Chookz

Board Regular
Joined
May 9, 2011
Messages
95
Hey Guys,
I have a range that consists of array formulas. The array formula also has an IFERROR formula attached to it to return a blank if there is an error (eg. formula - {=IFERROR(INDEX(Sheet1! etc etc.). The formula returns text in the cells

I want to make this a dynamic named range to include the cells where the array formula has returned a value, but not the ones that are blank due to an error (error comes up when there is no data entered in my raw data source).

I am using this named range as series values in a chart.

My usual dynamic named range formula:
=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A$1:$A$1000))
Doesn't work because the COUNTA still counts the blank cells that the IFERROR formula returns when there is no source raw data for the array formula. I want only the cells with text in them.

I was using the following:
=OFFSET(Sheet1!$A$1,,,COUNTA(Sheet1!$A$1:$A$1000)-COUNTBLANK(Sheet1!$A$1:$A$1000))
and having success, until one day the list was fully blank (no source raw data for that day so the array formula returned an error, which the IFERROR made "").

Then the next day when my range has text data in it again the OFFSET formula is screwed up and my charts are all over the place.

My question is, is there a better way of creating a dynamic named range (than my COUNTA - COUNTBLANK method) for text that has formulas returning blanks ("")?

And/Or Does anyone have a solution to get my named range to remain intact in my chart series values, even when the list is empty? I think this has to do with my COUNTA-COUNTBLANK not being the best.

Hopefully this makes sense, sorry it's kind of hard to explain.
Cheers
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You could try referring your name to:

=OFFSET(Sheet1!$A$1,,,MAX(1,(COUNTA(Sheet1!$A$1:$A$1000)-COUNTBLANK(Sheet1!$A$1:$A$1000))))
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

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