|
楼主 |
发表于 2021-4-9 12:45
|
显示全部楼层
从你的宏中,小修改了一下,好像满足使用要求了!谢谢你!!!
具休如下
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
On Error Resume Next
R = Selection.Column
If Target.Row = 3 And Target.Column > 3 And Target.Column < 16 Then
If Application.Sum(Range(Cells(Target.Row + 1, Target.Column), Cells(Target.Row + 8, Target.Column))) > 0 Then
Sheets("1月").Copy after:=Sheets(Sheets.Count)
'ActiveSheet.[h4:h11].ClearContents
ActiveSheet.[b1] = Target & "份绩效"
For i = 4 To 11
ActiveSheet.Cells(i, 8) = Sheet1.Cells(i, R)
Next i
ActiveSheet.Name = Target.Text
End If
End If
End Sub |
|