thelastflame
New Member
- Joined
- May 3, 2012
- Messages
- 14
Hey guys, here's what we've got.
Option Explicit
Sub Macro1()
Dim lngMyRow As Long
If WorksheetFunction.CountA(Sheets("B").Cells) = 0 Then
lngMyRow = 1
Else
lngMyRow = Sheets("B").Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Sheets("A").Range("D3:D20").Copy
Sheets("B").Range("A" & lngMyRow).PasteSpecial Transpose:=True
Application.CutCopyMode = False
End Sub
Thanks to another forum member, he helped me get this far however there is another issue. What the code above does, is copy the cells D3 through D20 into another sheet horizontally, adding a new row of copied cells every time the macro button is hit. Thing is, the cell it's copying updates every so often and I need to copied cells on sheet B to be static, basically copy the value not the formula? Any input ill greatly help, thx!
Option Explicit
Sub Macro1()
Dim lngMyRow As Long
If WorksheetFunction.CountA(Sheets("B").Cells) = 0 Then
lngMyRow = 1
Else
lngMyRow = Sheets("B").Cells(Rows.Count, "A").End(xlUp).Row + 1
End If
Sheets("A").Range("D3:D20").Copy
Sheets("B").Range("A" & lngMyRow).PasteSpecial Transpose:=True
Application.CutCopyMode = False
End Sub
Thanks to another forum member, he helped me get this far however there is another issue. What the code above does, is copy the cells D3 through D20 into another sheet horizontally, adding a new row of copied cells every time the macro button is hit. Thing is, the cell it's copying updates every so often and I need to copied cells on sheet B to be static, basically copy the value not the formula? Any input ill greatly help, thx!