Paste not working again

S

Suzanne

I don't get it... this was working fine and then I had to insert another
column in the worksheet, and now the data is being thrown down to row 85
again (unless I sort descending, which I don't really want to do).

Here's the whole thing. I tried a code to just capture filled rows from
IHSF DATA ENTRY, but could not get it to work.

Sub GetIHSFMerge()

ActiveSheet.Unprotect

Sheets("IHSF DATA ENTRY").Range("B2:U500").Copy

With Sheets("MERGE DATA IHSF")
.Range("D2").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=True, Transpose:=False
End With

Dim Lrow As Long
With ActiveSheet
Lrow = Range("D" & Rows.Count).End(xlUp).Row
Range("B2:C" & Lrow).FillDown
Range("AA2:AL" & Lrow).FillDown

Dim Rng As Range
Set Rng = .Range(.Range("W1"), .Cells(Rows.Count, "B").End(xlUp))

Rng.SORT Key1:=.Cells(2, "B"), Order1:=xlAscending, MatchCase:=False,
Header:=xlYes

..Range("A2").Select

End With

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

End Sub


Any help would be greatly appreciated -- suzleigh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top