hobbiton73
04-04-2013, 08:28 AM
Hi, I wonder whether someone may be able to help me please.
I've put together the following code which extracts data from one sheet and copies it to another.
Sub AvailableDays()
Dim LR As Long, i As Long
With Sheets("Resource Summary")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With .Range("A" & i)
If .Value > 0 And .Value <> "Enter your name" Then .Copy Destination:=Sheets("Available Days").Range("A" & Rows.Count).End(xlUp).Offset(1)
End With
Next i
End With
End Sub
However I've come up against a few hurdles, which I'm hoping someone may be able to help me with please.
Could someone perhaps tell me please how I may be able to adjust this script, so that the copy range starts from A5 and the paste range starts at A8?
I also have the additional problem, in that in it's current format the code pastes the figures and formula in the 'Destination' sheet.
Could someone possibly tell me please how I can change this so it pastes the data as 'Paste Special'?
Many thanks and kind regards
Chris
I've put together the following code which extracts data from one sheet and copies it to another.
Sub AvailableDays()
Dim LR As Long, i As Long
With Sheets("Resource Summary")
LR = .Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To LR
With .Range("A" & i)
If .Value > 0 And .Value <> "Enter your name" Then .Copy Destination:=Sheets("Available Days").Range("A" & Rows.Count).End(xlUp).Offset(1)
End With
Next i
End With
End Sub
However I've come up against a few hurdles, which I'm hoping someone may be able to help me with please.
Could someone perhaps tell me please how I may be able to adjust this script, so that the copy range starts from A5 and the paste range starts at A8?
I also have the additional problem, in that in it's current format the code pastes the figures and formula in the 'Destination' sheet.
Could someone possibly tell me please how I can change this so it pastes the data as 'Paste Special'?
Many thanks and kind regards
Chris