View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Pasting Values Problem - sorting feature messed up

You should post the code you are currently using. However, it appears that
the problem is in how you copy the data from the source sheet. You can use
an If...Then statement to ignore the blank rows for copying. For example:

If Range("A1").Value < "" Then
Range("A1").EntireRow.Copy Sheets(2). _
Range("A" & Range(A65536").End(xlUP).Row)
End If

The above code would only copy the row if there is data in it. Otherwise it
is ignored.

"Munchkin" wrote:

This is complicated to explain - I'll do my best.

I have a macro that copies rows 10-34 from one worksheet & puts them on a
2nd worksheet. Colums A-C of each row contain a formulas that either copies
data from another cell or is left blank. If these cells are blank it means
nothing is entered on any cell of the rows. My macro copies each row anyway,
but only pastes the values onto another worksheet. (There's a reason for my
method, but the explanation would be to lengthy)

The macro works fine at moving the data, but when I try to go in & sort the
copied data I wind up with blank rows at the top. These are obviously the
copied rows that had formulas, but no text - since I pasted the values
nothing is shown in any the blank row cells - no formula or text - so what is
the sorting feature picking up?