Hi all
I am having difficulty trying to get the values in a row in sheet 2 to copy down depending on if a value in a cell is > 0
here is thecode I have so far
I have attached the sheet for you to see my progress, it does the first part ok but fails to copy the row down in sheet 2
I am having difficulty trying to get the values in a row in sheet 2 to copy down depending on if a value in a cell is > 0
here is thecode I have so far
Code:
Sub Macro2()
'
' Macro2 Macro
'
'
Range("A1").Select
Selection.Copy
Sheets("Sheet2").Select
Range("B2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("C1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("F2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("E1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("I1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("G2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
ActiveWindow.SmallScroll Down:=-6
Range("M1").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet2").Select
Range("R2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("U2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("V2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.Goto (ActiveWorkbook.Sheets("Sheet1").Range("N1"))
If N1 > 0 Then
Sheets("Sheet2").Select
Range("A2:G2").Select
Selection.Copy
Range("A3:G3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
End Sub
I have attached the sheet for you to see my progress, it does the first part ok but fails to copy the row down in sheet 2
Attachments
Last edited by a moderator: