breynolds0431
Active Member
- Joined
- Feb 15, 2013
- Messages
- 303
- Office Version
- 365
- 2016
- Platform
- Windows
Currently, I'm using a =SUMPRODUCT(COUNTIF()) method to build a sequencing of IDs. That is, if there is more than one ID in the range, then a formula assigns a sequence to a column. It takes some time, even when writing the formulas using VBA. Wondering if there's a way to use dictionary or some other memory means of achieving this.
This is what I use to write the formulas to the column. There may be upwards of 100,000 rows that need this formula.
This is what I use to write the formulas to the column. There may be upwards of 100,000 rows that need this formula.
VBA Code:
With Application
.ScreenUpdating = False
.Calculation = xlCalculationManual
End With
ws.Range("B13:B" & Range("D" & rows.count).End(xlUp).row).Formula = _
"=SUMPRODUCT(COUNTIF($D$13:D13,D13))"
With Application
.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With