View Single Post
 
Old 01-09-2019, 07:51 PM
Dave T Dave T is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Nov 2014
Location: Australia
Posts: 66
Dave T is on a distinguished road
Default Delete row (if blank) below text string

Hello All,

Probably quite simple but virtually all of the macros I have searched for show how to find a value or text string and delete the row the value is within.

I need to find the single instance of a cell that contains the words REVERSE DIRECTION (in uppercase and this is all the cell contains) and if the cell/row below the text is blank, delete the blank row, but if the cell below has text or a value do not delete the row (exit the sub).
For example: If the macro was to be re-run several times, I do not want the macro finding the same string and deleting existing data/rows.

In my case I have an extract output from another program and this is opened with Excel and the output has the following:
• the first 12 rows are headings and these headings are separated by blank rows
• the string REVERSE DIRECTION could be anywhere in column B

Regards,
David T
Reply With Quote