GSCaupling
Technical User
Using Win 7 & Excel 2013
I'm totally new to VBA code, but I need some kind of code/macro/magic that will delete rows in Excel.
Each month I import a financial statement with about 500 rows and I need to delete all but 350 of those rows. The rows I want to keep have an account number in Column D that begins with B and is followed by five digits (B12345). Some entries in Column D begin with a valid account number but are followed by other text (B12345~Smith, John).
I can identify the keepers with AND(Left(D1,1)="B",LEN(D1)=6). I want to identify and delete every row that does NOT meet these two criteria.
Thanks,
GS
[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]
I'm totally new to VBA code, but I need some kind of code/macro/magic that will delete rows in Excel.
Each month I import a financial statement with about 500 rows and I need to delete all but 350 of those rows. The rows I want to keep have an account number in Column D that begins with B and is followed by five digits (B12345). Some entries in Column D begin with a valid account number but are followed by other text (B12345~Smith, John).
I can identify the keepers with AND(Left(D1,1)="B",LEN(D1)=6). I want to identify and delete every row that does NOT meet these two criteria.
Thanks,
GS
[Green]******^*******
[small]I[/small] [small]Hate[/small] [♥] [small]Ambiguity.[/small][/green]