Small Paul
Board Regular
- Joined
- Jun 28, 2018
- Messages
- 118
Hi All
I have a macro but am struggling with this part.
The code for this section is presently:
I have tried using text "None" in the formula but that fails too!
What I am trying to do is:
Any guidance would be greatly appreciated.
Cheers
Small Paul.
I have a macro but am struggling with this part.
The code for this section is presently:
Code:
Range("A2").Select ActiveCell.FormulaR1C1 = "1"
Range("A3").Select
ActiveCell.FormulaR1C1 = _
"=IF(AND(RC[28]=R[-1]C[28],RC[29]=R[-1]C[29],RC[30]=R[-1]C[30]),R[-1]C,R[-1]C+1)"
Range("A3").Select
Selection.AutoFill Destination:=Range("A3:A500")
I have tried using text "None" in the formula but that fails too!
What I am trying to do is:
- Column A increases by 1 on each row where the row differs (according to the following criteria)
- A2 will have "1" entered into it
- A3 will then be active cell
- If AC3 <> "None", does AC3 = AC2, AND does AE3 = AE2. If yes, then A3 = A2, else A2+1
- If AC3 = "None", does AD3 = AD2, AND does AE3 = AE2. If yes, then A3 = A2, else A2+1
- This formula is then autofilled to the last row containing data
Any guidance would be greatly appreciated.
Cheers
Small Paul.