noobie
01-18-2007, 08:15 PM
:bow: hi all,
i currently have this macro which I've gotten from this forum. But I do not know how to only copy values wthout any conditional formatting nor formulas. Could u tell me how do i proceed from this ?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lrow As Long
'look at changes in range K2:K35
If Not Intersect(Target, Range("M2:M89")) Is Nothing Then
lrow = Sheets("Records").Range("A" & Rows.Count).End(xlUp).Row
'when not using headings check if something in else row = 1
If Sheets("Records").Range("A1").Value <> "" Then
lrow = lrow + 1
Range("A" & Target.Row & ":H" & Target.Row).copy Sheets("Records").Range("A" & lrow)
Range("L" & Target.Row & ":M" & Target.Row).copy Sheets("Records").Range("I" & Target.Row & ":K" & lrow)
Else
Range("A" & Target.Row & ":H" & Target.Row).copy Sheets("Records").Range("A" & lrow)
Range("L" & Target.Row & ":M" & Target.Row).copy Sheets("Records").Range("I" & Target.Row & ":K" & lrow)
End If
End If
End Sub
Many thanks. :beerchug:
i currently have this macro which I've gotten from this forum. But I do not know how to only copy values wthout any conditional formatting nor formulas. Could u tell me how do i proceed from this ?
Private Sub Worksheet_Change(ByVal Target As Range)
Dim lrow As Long
'look at changes in range K2:K35
If Not Intersect(Target, Range("M2:M89")) Is Nothing Then
lrow = Sheets("Records").Range("A" & Rows.Count).End(xlUp).Row
'when not using headings check if something in else row = 1
If Sheets("Records").Range("A1").Value <> "" Then
lrow = lrow + 1
Range("A" & Target.Row & ":H" & Target.Row).copy Sheets("Records").Range("A" & lrow)
Range("L" & Target.Row & ":M" & Target.Row).copy Sheets("Records").Range("I" & Target.Row & ":K" & lrow)
Else
Range("A" & Target.Row & ":H" & Target.Row).copy Sheets("Records").Range("A" & lrow)
Range("L" & Target.Row & ":M" & Target.Row).copy Sheets("Records").Range("I" & Target.Row & ":K" & lrow)
End If
End If
End Sub
Many thanks. :beerchug: