Hi,
I am trying to populate and clear fields using a check box.
I have written something long and stupid that will not work. Can someone help me.
This is what I have:
If Sheets("MISC DATA").Range("C18").Value = "TRUE" Then
Range("F5:N5").Select
Selection.Copy
Range("F20:N20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E7:N7").Select
Application.CutCopyMode = False
Selection.Copy
Range("E22:N22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E9:N9").Select
Application.CutCopyMode = False
Selection.Copy
Range("E24:N24").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D11:F11").Select
Application.CutCopyMode = False
Selection.Copy
Range("D26:F26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I11:J11").Select
Application.CutCopyMode = False
Selection.Copy
Range("I26:J26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("M11:N11").Select
Application.CutCopyMode = False
Selection.Copy
Range("M26:N26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E13:G13").Select
Application.CutCopyMode = False
Selection.Copy
Range("E28:G28").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E15:J15").Select
Application.CutCopyMode = False
Selection.Copy
Range("E30:J30").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
If Sheets("MISC DATA").Range("C18").Value = "FALSE" Then
Range("F20:N20,E22:N22,E24:N24,D26:F26,I26:J26,M26:N26,E28:G28,E30:J30").Select
Selection.ClearContents
End If
I am trying to populate and clear fields using a check box.
I have written something long and stupid that will not work. Can someone help me.
This is what I have:
If Sheets("MISC DATA").Range("C18").Value = "TRUE" Then
Range("F5:N5").Select
Selection.Copy
Range("F20:N20").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E7:N7").Select
Application.CutCopyMode = False
Selection.Copy
Range("E22:N22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E9:N9").Select
Application.CutCopyMode = False
Selection.Copy
Range("E24:N24").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("D11:F11").Select
Application.CutCopyMode = False
Selection.Copy
Range("D26:F26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("I11:J11").Select
Application.CutCopyMode = False
Selection.Copy
Range("I26:J26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("M11:N11").Select
Application.CutCopyMode = False
Selection.Copy
Range("M26:N26").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E13:G13").Select
Application.CutCopyMode = False
Selection.Copy
Range("E28:G28").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E15:J15").Select
Application.CutCopyMode = False
Selection.Copy
Range("E30:J30").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End If
If Sheets("MISC DATA").Range("C18").Value = "FALSE" Then
Range("F20:N20,E22:N22,E24:N24,D26:F26,I26:J26,M26:N26,E28:G28,E30:J30").Select
Selection.ClearContents
End If