View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
AJM1949 AJM1949 is offline
external usenet poster
 
Posts: 31
Default Copy range if column N is empty

Many Thanks
It works perfectly

Cheers
Alan

"JLGWhiz" wrote:

This might work

Sub terrain()
Dim sh1 As Worksheet, sh2 As Worksheet
Dim lr1 As Long, lr2 As Long, rng As Range
Set sh1 = Sheets("Sales")
Set sh2 = Sheets("Carryovers")
lr = sh1.Cells(Rows.Count, 1).End(xlUp).Row
Set rng = sh1.Range("N1:N" & lr)
For Each c In rng
If c.Value = "" Then
Range("A" & c.Row).Resize(1, 21).Copy _
sh2.Range("A" & sh2.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row)
End If
Next
End Sub




"ajm1949" wrote in message
...
Hi all
I have looked through the forums but can't find what i need.

In each row that column N (Sheet name is Sales) is empty I want to copy
columns A:T to another worksheet (Sheet Name is Carryovers) starting at A2
Hope this is clear enough

many thanks in advance

Alan
ajm1949



.