Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Naming a non-blank range from a col containing non-consec. blank c

Excel 2007. I have a column of data containing several blank cells. These
blank cells are spread out all through the column. I want to define a named
range that contains only the non-blank cells of this column.

I have seen a previous post of how to do this using an array formula, but
the solution not only looks cumbersome but doesn't quite appear to do what
I'm looking for anyway. This solution was found at
cpearson.com/excel/noblanks.htm

Does anyone know of a cleaner solution than this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Naming a non-blank range from a col containing non-consec. blank c

An alternative play using non-array formulas ..

Assume the data (with interspersed blanks) is in Sheet1, in A1 down

In B1:
=IF(A1="","",ROW())

In C1:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(A:A,SMALL(B:B,R OWS($1:1))))
Select B1:C1, copy down to cover the max expected extent of data in col A,
eg down to C200. Col C returns what's in col A but wo blanks.

Then just define a dynamic named range, eg: MyRange
to point to col C, via: Insert Name Define with settings:

Names in workbook:
MyRange

Refers to:
=OFFSET(Sheet1!$C:$C,,,SUMPRODUCT(--(Sheet1!$C$1:$C$200<"")))

(Adapt the range $C$1:$C$200 to suit the max expected extent)

Above works in xl2003 (my ver). I don't know/have xl2007, but think it
should work just as well <g
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"fruitticher" wrote:
Excel 2007. I have a column of data containing several blank cells. These
blank cells are spread out all through the column. I want to define a named
range that contains only the non-blank cells of this column.

I have seen a previous post of how to do this using an array formula, but
the solution not only looks cumbersome but doesn't quite appear to do what
I'm looking for anyway. This solution was found at
cpearson.com/excel/noblanks.htm

Does anyone know of a cleaner solution than this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Naming a non-blank range from a col containing non-consec. bla

Max,

Brilliant! Thanks a ton.

- fruitticher



"Max" wrote:

An alternative play using non-array formulas ..

Assume the data (with interspersed blanks) is in Sheet1, in A1 down

In B1:
=IF(A1="","",ROW())

In C1:
=IF(ROWS($1:1)COUNT(B:B),"",INDEX(A:A,SMALL(B:B,R OWS($1:1))))
Select B1:C1, copy down to cover the max expected extent of data in col A,
eg down to C200. Col C returns what's in col A but wo blanks.

Then just define a dynamic named range, eg: MyRange
to point to col C, via: Insert Name Define with settings:

Names in workbook:
MyRange

Refers to:
=OFFSET(Sheet1!$C:$C,,,SUMPRODUCT(--(Sheet1!$C$1:$C$200<"")))

(Adapt the range $C$1:$C$200 to suit the max expected extent)

Above works in xl2003 (my ver). I don't know/have xl2007, but think it
should work just as well <g
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"fruitticher" wrote:
Excel 2007. I have a column of data containing several blank cells. These
blank cells are spread out all through the column. I want to define a named
range that contains only the non-blank cells of this column.

I have seen a previous post of how to do this using an array formula, but
the solution not only looks cumbersome but doesn't quite appear to do what
I'm looking for anyway. This solution was found at
cpearson.com/excel/noblanks.htm

Does anyone know of a cleaner solution than this?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Naming a non-blank range from a col containing non-consec. bla

welcome. good to hear that.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"fruitticher" wrote in message
...
Max,

Brilliant! Thanks a ton.

- fruitticher



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Worksheet Functions 3 May 14th 23 07:43 PM
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
Not showing blank and non blank items in filter mode for values Bhaskar Polisetty Excel Worksheet Functions 0 June 20th 06 02:04 PM
Sumif to return a blank if sum range is blank [email protected] Excel Worksheet Functions 3 May 25th 06 10:25 AM
conditional formatting:highlight row based on blank or non-blank c Nat Maxwell Excel Discussion (Misc queries) 2 November 30th 05 10:30 PM


All times are GMT +1. The time now is 05:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"