Hello again,
So this one is beyond the capabilities of what I've learned so far. I googled around and didn't find much. I need for the macro to look into column D, and if it finds a value in column D, delete the rows down to the next value minus two rows, so that the line with first and last names above is preserved. To put it simply, red has to be deleted. The sample will show why:
<tbody>
</tbody>
I know they say that deleting rows should be done from the bottom up. So maybe it will be easier to search column D from the bottom, and then skip 2 rows up upon finding a value.
But then again, if two lines are skipped, another value may pop in, like in the sample above. You find 254, and two lines up, there's another 254, and both have to be preserved.
Please tell me if this, can at all, be done.
So this one is beyond the capabilities of what I've learned so far. I googled around and didn't find much. I need for the macro to look into column D, and if it finds a value in column D, delete the rows down to the next value minus two rows, so that the line with first and last names above is preserved. To put it simply, red has to be deleted. The sample will show why:
A | B | C | D | E | ||
470 | FIRSTNAME, LNAME | |||||
<tbody> </tbody> | XYZ | 123 | ONE | |||
308 | FIRNAME, LANAME | |||||
<tbody> </tbody> | ||||||
<tbody> </tbody> | FNAME, LASTNAME | |||||
<tbody> </tbody> | ||||||
519 | FNAME, LNAME | |||||
<tbody> </tbody> | ||||||
<tbody> </tbody> |
<tbody> </tbody> | 254 | FIVE | |||
<tbody> </tbody> | ||||||
<tbody> </tbody> |
<tbody> </tbody> | 254 | FIVE | |||
<tbody>
</tbody>
I know they say that deleting rows should be done from the bottom up. So maybe it will be easier to search column D from the bottom, and then skip 2 rows up upon finding a value.
But then again, if two lines are skipped, another value may pop in, like in the sample above. You find 254, and two lines up, there's another 254, and both have to be preserved.
Please tell me if this, can at all, be done.