What happens if you (or that someone) just sorts the data?
Don't the "blanks" get sorted to the top or the bottom--or at least grouped
together?
> I noted a post in January where someone wanted to insert blank rows in
> every other row of a worksheet
[quoted text clipped - 18 lines]
>
> RL

Signature
Dave Peterson
legg - 29 Apr 2008 22:41 GMT
>What happens if you (or that someone) just sorts the data?
>
>Don't the "blanks" get sorted to the top or the bottom--or at least grouped
>together?
Actually, it's even worse than I thought.
A worksheet won't sort. Tried reversing order (12,000 lines) without
effect.
Text should at least sort in alpha-numerical order, from my
experience.
yow
RL
Dave Peterson - 29 Apr 2008 22:49 GMT
Are you selecting the range to sort or allowing excel to guess what it should
be.
If you're not selecting the range first, try that. Excel can often guess
wrong--especially with blank rows and/or blank columns.
> >What happens if you (or that someone) just sorts the data?
> >
[quoted text clipped - 12 lines]
>
> RL

Signature
Dave Peterson
legg - 29 Apr 2008 23:11 GMT
>Are you selecting the range to sort or allowing excel to guess what it should
>be.
>
>If you're not selecting the range first, try that. Excel can often guess
>wrong--especially with blank rows and/or blank columns.
That seemed to do the trick.
With all data selected and specifying a sort by column, the blank
lines got ousted without losing row association.
Many thanks.
RL
If the rows do not sort out then you are probably correct in surmising some type
of baggage in blank cells.
Sub TRIM_EXTRA_SPACES()
Dim Cell As Range
For Each Cell In Selection
If (Not IsEmpty(Cell)) And _
Not IsNumeric(Cell.Value) And _
InStr(Cell.Formula, "=") = 0 _
Then Cell.Value = Application.Trim(Cell.Value)
Next
End Sub
Note: if the baggage is is the non-breaking space character 160 you can try an
Edit>Replace
what: Alt + 0160 (on numpad)
with: nothing
replace all
When done, F5>Special>Blanks>OK>Edit>Delete>Entire Rows
Gord Dibben MS Excel MVP
>I noted a post in January where someone wanted to insert blank rows in
>every other row of a worksheet
[quoted text clipped - 18 lines]
>
>RL
legg - 29 Apr 2008 23:02 GMT
>If the rows do not sort out then you are probably correct in surmising some type
>of baggage in blank cells.
[quoted text clipped - 21 lines]
>
>Gord Dibben MS Excel MVP
I tried the macro. Got a long wait, but no apparent effect or change
in sorting behavior.
The edit function can't to find the character, in the sheet or
selected lines.
RL
Dave - 29 Apr 2008 23:05 GMT
Hi,
Do you really have blank XL rows between you data, or do you have a blank
line at the bottom of each XL row?
Dave
legg - 29 Apr 2008 23:30 GMT
>Hi,
>Do you really have blank XL rows between you data, or do you have a blank
>line at the bottom of each XL row?
>Dave
No, it was a new enumerated line, and not grouped or associated with
the preceding line. Selecting all of the data on the page and sorting
by selected column got rid of the blanks in a trial worksheet.
I was used to just having to pick a single column cell to do this
previously.
12000 lines are now 6000 without loss of row associations.
Thanks for the help.
RL