Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have a range of cells A1:a10, say, which obtain data from another source.
Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
#2
![]() |
|||
|
|||
![]()
this is
from one of the newsgroup correspondents use this code statement Range("a1:a10").SpecialCells(xlCellTypeBlanks).Ent ireRow.Delete ================================= Hugh Murfitt wrote in message ... I have a range of cells A1:a10, say, which obtain data from another source. Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
#3
![]() |
|||
|
|||
![]()
I was hoping for a formula that would re-order automatically without losing
data "R.VENKATARAMAN" wrote: this is from one of the newsgroup correspondents use this code statement Range("a1:a10").SpecialCells(xlCellTypeBlanks).Ent ireRow.Delete ================================= Hugh Murfitt wrote in message ... I have a range of cells A1:a10, say, which obtain data from another source. Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
#5
![]() |
|||
|
|||
![]()
Hugh
What type of analysing are you doing on the data? Most Functions will ignore blanks in a range. =SUM(A1:A10) ignores the blanks. To delete the blanks if desired.......... Select A1:A10 then F5SpecialBlanksOK EditDeleteShift Up. Gord Dibben Excel MVP On Fri, 4 Mar 2005 03:43:03 -0800, Hugh Murfitt wrote: I have a range of cells A1:a10, say, which obtain data from another source. Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
#6
![]() |
|||
|
|||
![]()
{=INDEX(A$1:A$10,SMALL(IF(A$1:A$10<0,ROW(A$1:A$10 ),""),ROW(A1:A1)))}
(control-shift-enter) will work if they are really blanks. If the "blank" values are "" returned from elsewhere, they will remain "". If 0 is returned, they will be removed. Note that your 1st reference must be to A1. Won't work if you use A2, for example. HTH Hugh Murfitt wrote: I have a range of cells A1:a10, say, which obtain data from another source. Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
#7
![]() |
|||
|
|||
![]()
This is EXACTLY what I wanted. Thanks a million for saving me a huge amount
of time. "Hugh" wrote: {=INDEX(A$1:A$10,SMALL(IF(A$1:A$10<0,ROW(A$1:A$10 ),""),ROW(A1:A1)))} (control-shift-enter) will work if they are really blanks. If the "blank" values are "" returned from elsewhere, they will remain "". If 0 is returned, they will be removed. Note that your 1st reference must be to A1. Won't work if you use A2, for example. HTH Hugh Murfitt wrote: I have a range of cells A1:a10, say, which obtain data from another source. Some of those cells a3, a6:a8, say, under certain conditions, will be blank. How do I reorder this range such that the cells containing information are listed together, removing the blanks? I want to do this using a formula, rather than filter or sort, as the data, and hence the blank cells, will change, and I want to perform analysis on the cells containing data. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
sumproduct of part cells of a range with blanks | Excel Discussion (Misc queries) | |||
Dynamic Print Range Help | Excel Worksheet Functions | |||
Define a range based on another named range | Excel Worksheet Functions | |||
remove blanks from a string of chars within a cell? | Excel Discussion (Misc queries) | |||
How do i get an average that ignores blanks in the range of cells. | Excel Worksheet Functions |