G
GS
mp formulated the question :
Post your complet code so we can see what it's doing.
Cells are 'Empty' by default. Spaces don't enter themselves into cells.
Something MUST put that value there.
mp said:GS said:I suspect that row 11 had a space character in it. Some people have the
very nasty habit to use that for clearing a cell's contents. So, if it
returned 11 then that cell was not empty!
-- Garry
ha, that is entirely possible,
thanks, i never would have thought of that.
mark
now that i have re-run the code that fills those ranges,
I see it does put a space in the row after the actual data
I have no idea why it would do that...
Post your complet code so we can see what it's doing.
but till i get that worked out...
is this a terrible way to workaround the problem of
blank cells that aren't really blank ?
Function LastRowOfData(oWs As Worksheet, Column As Long) As Long
'get rid of spaces in seemingly blank cells
Dim oRng As Range
For Each oRng In oWs.UsedRange
If Len(Trim(oRng.Value)) = 0 Then
oRng.Value = ""
End If
Next oRng
LastRowOfData = oWs.Cells(oWs.Rows.Count, Column).End(xlUp).row
End Function
Cells are 'Empty' by default. Spaces don't enter themselves into cells.
Something MUST put that value there.