scriptscribe
MIS
Hi,
I want to increment the value of a cell (basically a counter) each time the value "DJJ:" appears in a neighboring column. My data looks like this:
COL1 COL2
DJJ: SMITH,JOHN
PMF: SMITH,JOHN A
DJJ: JONES,DAVEY
PMF: JONES,DAVY
PMF: JONES,DAVEY K
DJJ: DOE,JOHN
PMF: DOE,JOHN L
Basically, I'm looking for something like this:
Thanks!
Mike
I want to increment the value of a cell (basically a counter) each time the value "DJJ:" appears in a neighboring column. My data looks like this:
COL1 COL2
DJJ: SMITH,JOHN
PMF: SMITH,JOHN A
DJJ: JONES,DAVEY
PMF: JONES,DAVY
PMF: JONES,DAVEY K
DJJ: DOE,JOHN
PMF: DOE,JOHN L
Basically, I'm looking for something like this:
Code:
x = 1
Do
If ActiveCell.value(in column B) <> "DJJ:"
Then Next Line
Else write x
x = x+1
While last cell in column B is not null
Thanks!
Mike