M
Mr. Smith
Hi.
(VBA scripting in Excel 2003)
Case:
If all values in column A are identical, Then
No need to activate SUBTOTAL on the data.
Else
Activate SUBTOTALS.
End if
What would be a "slick" way of checking column A for changing values? The
smartes way I can think of is something like this
chkstr = Range("A2")
For i = 3 to LastRowOfData 'Data starts in row 2, row 1 contains heading
If Cells("A"&i) <> chkstr Then
GoTo: InsertSubtotals
Next i
'Not even sure if it would work.....
Kind regards
Mr. Smith
(VBA scripting in Excel 2003)
Case:
If all values in column A are identical, Then
No need to activate SUBTOTAL on the data.
Else
Activate SUBTOTALS.
End if
What would be a "slick" way of checking column A for changing values? The
smartes way I can think of is something like this
chkstr = Range("A2")
For i = 3 to LastRowOfData 'Data starts in row 2, row 1 contains heading
If Cells("A"&i) <> chkstr Then
GoTo: InsertSubtotals
Next i
'Not even sure if it would work.....
Kind regards
Mr. Smith