Hi all
I am using this code to fill in numbers in sequential order when double clicking in a cell. So, if number 1 is in F1 and I double click in F10, 2 thru 10 will autofill down.
The issue that I am having is that it is copying the format as well. I would like just the values to copy down.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Variant: c = Split(Target.Address, "$")(1)
Select Case c
Case "F"
Cancel = True
Target.End(xlUp).AutoFill Range(Target.End(xlUp), Target), xlFillSeries
End Select
End Sub
Thank you!
Russ
I am using this code to fill in numbers in sequential order when double clicking in a cell. So, if number 1 is in F1 and I double click in F10, 2 thru 10 will autofill down.
The issue that I am having is that it is copying the format as well. I would like just the values to copy down.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim c As Variant: c = Split(Target.Address, "$")(1)
Select Case c
Case "F"
Cancel = True
Target.End(xlUp).AutoFill Range(Target.End(xlUp), Target), xlFillSeries
End Select
End Sub
Thank you!
Russ