使用数据验证w /宏选择一个选项,然后在控制表上复制和过去模板标题(命名范围),然后在模板下填充数据拉
应该宣布什么? 当下拉菜单更改为选定的组时,我希望excel在A6之后清除工作表,然后超过A6上的定义范围。然后......我将在定义columes中使用公式。
Sub CSCCentralLateStageVolsTC()
'
' CSCCentralLateStageVolsTC Macro
'
If "B2" = "CSC Central - Late Stage Vols" Then
'
Range("A6:X1000").Select
Selection.Delete Shift:=xlUp
Sheets("Templates").Select
Application.Goto Reference:="CSCCentralLateStageVols"
Selection.Copy
Sheets("Control").Select
Range("A6").Select
ActiveSheet.Paste
ElseIf "B2" = "CSC CENTRAL- Late Stage" Then
Range("A6:X1000").Select
Selection.Delete Shift:=xlUp
Sheets("Templates").Select
Application.Goto Reference:="CSCCentralLateStage"
Selection.Copy
Sheets("Control").Select
Range("A6").Select
ActiveSheet.Paste
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlBottom
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = False
End With
End If
End Sub