Hi,
I am hoping to get a vba for the following.
In sheet2, column R, loop through cells and look for cells which start with "GHT:" (not case sensitive).
If it finds two cells that begin with "GHT:", cut and clear the bottom one and paste replace the top one.
Not critical but it will be nice if GHT can be all CAP after cell has been pasted, regardless of how the bottom cell originally was.
The number of preceding, intervening and subsequent rows vary.
"GHT:" could be in the first row although unlikely.
No blanks.
Thank you.
Here is the example.
BEFORE
AFTER
I am hoping to get a vba for the following.
In sheet2, column R, loop through cells and look for cells which start with "GHT:" (not case sensitive).
If it finds two cells that begin with "GHT:", cut and clear the bottom one and paste replace the top one.
Not critical but it will be nice if GHT can be all CAP after cell has been pasted, regardless of how the bottom cell originally was.
The number of preceding, intervening and subsequent rows vary.
"GHT:" could be in the first row although unlikely.
No blanks.
Thank you.
Here is the example.
BEFORE
Only necessary VBA 11.xlsm | |||
---|---|---|---|
R | |||
1 | 1 | ||
2 | 2 | ||
3 | 3 | ||
4 | GHT: 1 | ||
5 | 4 | ||
6 | 5 | ||
7 | 6 | ||
8 | Ght: 2 | ||
9 | 7 | ||
Sheet2 |
AFTER
Only necessary VBA 11.xlsm | |||
---|---|---|---|
R | |||
1 | 1 | ||
2 | 2 | ||
3 | 3 | ||
4 | GHT: 2 | ||
5 | 4 | ||
6 | 5 | ||
7 | 6 | ||
8 | |||
9 | 7 | ||
Sheet2 |