Hello All,

I'm trying to create a VBA code that does the following:

I'm trying to get the code to insert a blank row after the last row with a T in column AA it for matching values in column B. Then continue up column B identifying the next set of matching values, find the last corresponding row with a T in column AA and insert a line underneath it.

Here's an example of what the code would do to a set of data.


For example:

Col. B: Column AA:
Loc001 TV
Loc002 T
Loc002 T
insert line here
Loc003 XRT
Loc004 T
Loc004 T
Loc004 T
insert line here
Loc005 FFT
Loc006 T
insert line here
Loc007 T
insert line here
Loc008 T
Loc008 T
would not insert a line here because Loc008 does not have only "T"
Loc008 XRT
Loc009 T
insert line here
Loc010 FRT

So it always inserts a line after the last T for the same location if and only if there is only T's in that set of locations. Any ideas?

Thank you!

Note this is cross posted at http://www.mrexcel.com/forum/excel-q...ml#post4053172