It's a frequency table representing the original column of just 1's and 0's.
If the original data is to be overwritten then only this code:
Cells(r, i + 1) = H: Cells(r, i + 2) = k: k = 0: r = r + 1
needs to be altered:
Cells(r, i ) = H: Cells(r, i + 1) = k: k = 0: r = r + 1
It's now set up to place the items and their frequencies beside the original data, of course that leaves the problem of what to do with the original data - one option is to delete those lines once they're counted.
The assignments:
ASSIGNATIONS:
i = 7: j = 4: r = j: k = 0: S = Cells(j, i): H = S
Are set up to start in G4 from whence I did my testing.
ASSIGNATIONS:
i = 1: j = 1: r = j: k = 0: S = Cells(j, i): H = S
By just changing the i - Column and j - row to ones the routine would key on A1.
Bookmarks