Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Tim
 
Posts: n/a
Default Eliminating Blank Cells From Lists on different worksheets

Hi

On Chip Pearsons web page http://www.cpearson.com/excel/noblanks.htm I
found this Array formula for Eliminating Blank Cells From Lists:

=IF(ROW()-ROW(NoBlanksRange)+3ROWS(BlanksRange)-COUNTBLANK(BlanksRange),"",INDIRECT(ADDRESS(SMALL( (IF(BlanksRange<"",ROW(BlanksRange),ROW()+ROWS(Bl anksRange))),ROW()-ROW(NoBlanksRange)+3),COLUMN(BlanksRange),4)))

The formula works great when BlanksRange and NoBlanksRange are on the same
worksheet. Unfortunately my BlanksRange and NoBlanksRange are on different
worksheets. Both columns have same number of rows and start in the same row
3. In this case the formula gives me values of 0 for the cells in the
NoBlanksRange.
Does anybody know how to correct this formula to work when the BlanksRange
and NoBlanksRange are on different worksheets? In my case number €ś4€ť at the
end of the formula doesnt affect the result but I am also not quite sure
what the purpose of this number in the formula is.

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Eliminating Blank Cells From Lists on different worksheets

Add the sheet name to the INDIRECT part

=IF(ROW()-ROW(NoBlanksRange)+3ROWS(BlanksRange)-COUNTBLANK(BlanksRange),"",
INDIRECT("'sheet_name'!"&ADDRESS(SMALL((IF(BlanksR ange<"",ROW(BlanksRange),
ROW()+ROWS(BlanksRange))),ROW()-ROW(NoBlanksRange)+3),COLUMN(BlanksRange),4)
))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Tim" wrote in message
...
Hi

On Chip Pearson's web page http://www.cpearson.com/excel/noblanks.htm I
found this Array formula for Eliminating Blank Cells From Lists:


=IF(ROW()-ROW(NoBlanksRange)+3ROWS(BlanksRange)-COUNTBLANK(BlanksRange),"",
INDIRECT(ADDRESS(SMALL((IF(BlanksRange<"",ROW(Bla nksRange),ROW()+ROWS(Blank
sRange))),ROW()-ROW(NoBlanksRange)+3),COLUMN(BlanksRange),4)))

The formula works great when BlanksRange and NoBlanksRange are on the same
worksheet. Unfortunately my BlanksRange and NoBlanksRange are on different
worksheets. Both columns have same number of rows and start in the same

row
3. In this case the formula gives me values of 0 for the cells in the
NoBlanksRange.
Does anybody know how to correct this formula to work when the BlanksRange
and NoBlanksRange are on different worksheets? In my case number "4" at

the
end of the formula doesn't affect the result but I am also not quite sure
what the purpose of this number in the formula is.



  #3   Report Post  
Tim
 
Posts: n/a
Default Eliminating Blank Cells From Lists on different worksheets

Thank you Bob!
This did the job.


Tim


  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default Eliminating Blank Cells From Lists on different worksheets

Good. I did not know about that code on Chip's site, so we both got
something :-)).

Bob


"Tim" wrote in message
...
Thank you Bob!
This did the job.


Tim




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
Excel inserted 0's in cells linked to blank cells lburg801 Excel Discussion (Misc queries) 5 October 28th 05 11:32 PM
CONCATENATE problem with blank cells roger_home Excel Discussion (Misc queries) 1 August 17th 05 09:18 PM
How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 3 March 17th 05 02:48 PM
REPOST: How can I make the graph omit blank cells in the data set? easy Charts and Charting in Excel 2 March 17th 05 09:57 AM
Assigning Cells in worksheets to other data in other worksheets. David McRitchie Excel Discussion (Misc queries) 0 November 27th 04 06:15 PM


All times are GMT +1. The time now is 01:37 AM.

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"