Thread
:
Removing blanks from a spreadsheet
View Single Post
#
1
Posted to microsoft.public.excel.worksheet.functions
Niels Jonker
external usenet poster
Posts: 3
Removing blanks from a spreadsheet
Brilliant, thank you very much.
I could have never thought of the line "For each cell etc..."
Niels
"Gazeta" wrote:
U¿ytkownik "Niels Jonker" <Niels
napisa³ w
wiadomo¶ci ...
I created a huge data analysis file that consists of 50 by 214 cells.
According to my formula's, it will only show data if a lot of demands are
met. In reality, this means, about 15 to 20 of them have data, and the
others
are blank.
I now want to quickly remove all the blanks. However, Go
ToSpecialblanks,
doesn't work, because for some reason, Excel doesn't consider my blanks to
be
blank, even after I copied the values to another worksheet, and am certain
that these cells are actually blank and empty.
Soooo, do any of you experts know a solution for this problem? Or another
way to quickly gather these appx. 20 cells that do have data in them in
one
column? Without blanks? I'd hate to do that manually.
Thank you in advance. I'll be in bed really soon, cause it is terribly
late
in Europe, but I'll be back first thing in the morning to check your
ideas,
and provide feedback or add info I forgot to post right away...
try
Sub test()
Dim act As Worksheet
Set act = ActiveSheet
Sheets.Add After:=Sheets(act.Index)
ActiveSheet.Name = "formulas"
Row = 2
For Each cell In act.Range("a1").SpecialCells(xlCellTypeFormulas, 23)
If cell.Value < "" Then
cell.Copy
Sheets("formulas").Range("a" & Row).PasteSpecial xlPasteValues
Row = Row + 1
End If
Next
End Sub
run it when your sheet is active
mcg
Reply With Quote
Niels Jonker
View Public Profile
Find all posts by Niels Jonker