Hi guys,
I'm just building a macro at the moment for the first time so I'm not very experienced in them as of yet.
Essentially, I'm creating a macro that will create a separate graph each time the data in a certain column changes. To mark where the changes are to help me create the macro, I used a formula of =IF(A1=A2,"","X"). Only problem is, when I (Ctrl + Shift + Down), it skips past all the X's and goes to the end of the data set. I want to be able to (Ctrl + Shift + Down) and stop at the X each time.
My current macro script is:
Sub Macro1()
'
' Macro1 Macro
'
'
Range("D1").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-3]=R[1]C[-3],"""",""X"")"
Range("D1").Select
Selection.AutoFill Destination:=Range("D1:D23")
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False
I'm just building a macro at the moment for the first time so I'm not very experienced in them as of yet.
Essentially, I'm creating a macro that will create a separate graph each time the data in a certain column changes. To mark where the changes are to help me create the macro, I used a formula of =IF(A1=A2,"","X"). Only problem is, when I (Ctrl + Shift + Down), it skips past all the X's and goes to the end of the data set. I want to be able to (Ctrl + Shift + Down) and stop at the X each time.
My current macro script is:
Sub Macro1()
'
' Macro1 Macro
'
'
Range("D1").Select
ActiveCell.FormulaR1C1 = "=IF(RC[-3]=R[1]C[-3],"""",""X"")"
Range("D1").Select
Selection.AutoFill Destination:=Range("D1:D23")
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Paste
Application.CutCopyMode = False