I am looking to build a macro that will delete rows of data from my Excel sheet based on a specific trigger and a specific stop.
Below you will see the format for my data. All rows of data are in column A (single column report), each line of data is in the next row down so it's a sheet that only uses column A and the entire report has about 60,000 lines of data. I have included a few below.
What I am looking to do is use field tag :50 to start the deletion, then delete that row and the following rows of data until the next colon is reached. So basically I need the macro to look for each :, then read the following characters to see if they are 50, if yes, then delete that row of data and continue deleting rows of data until the next : is reached. then start over by reading that colon and the two characters following that : to see if it's 50, if yes, delete through the next colon, but if the next two characters are not 50, then I need it to move to the next colon and read again, deleting if a 50 is found following the colon ":". This must continue down through the entire sheet for column A through the last row.
<tbody>
</tbody><colgroup><col></colgroup>
Below you will see the format for my data. All rows of data are in column A (single column report), each line of data is in the next row down so it's a sheet that only uses column A and the entire report has about 60,000 lines of data. I have included a few below.
What I am looking to do is use field tag :50 to start the deletion, then delete that row and the following rows of data until the next colon is reached. So basically I need the macro to look for each :, then read the following characters to see if they are 50, if yes, then delete that row of data and continue deleting rows of data until the next : is reached. then start over by reading that colon and the two characters following that : to see if it's 50, if yes, delete through the next colon, but if the next two characters are not 50, then I need it to move to the next colon and read again, deleting if a 50 is found following the colon ":". This must continue down through the entire sheet for column A through the last row.
:50K:/000004010016467 |
R.S.V.P. INTERNATIONAL, INC. |
4021 13TH AVENUE WEST |
SEATTLE WA 98119 |
:56A:FCBKHKHH |
:57D:First Commercial Bank Hong Kong Bra |
7/F, Hong Kong Club Building |
3A Charter Road |
Central, HK |
:59:/941110625844 |
Chiu Mi-Hsueh a.k.a. Deborah Chiu |
4F.,No 356-1, Fu-Shing North Road |
Taipei, Taiwan |
:70:IN. 16018 |
IN. S16018 |
:50K:/000007219406795 |
DIRECO INTERNATIONAL LLC |
7374 BERKSHIRE DOWNS DR |
RALEIGH NC 27616-5636 |
:56A:COEBLALA |
:57D:BANQUE POUR LE COMMERCE EXTERIEUR L |
AO PUBLIC |
1 PANGKHAM STREET |
VIENTIANE,LA |
<tbody>
</tbody><colgroup><col></colgroup>