View Single Post
 
Old 02-10-2019, 02:53 PM
MathiasFC MathiasFC is offline Windows 10 Office 2016
Novice
 
Join Date: Jan 2019
Posts: 12
MathiasFC is on a distinguished road
Default

My situation is this: I’ve got a table consisting of 2 columns and an unspecified number of rows. Though all cells in the second column have text, only some of the cells in the first columns have numbers. I need a way of quickly deleting whole rows, when the cell in the first column is empty, but leave the row if the cell in the first column is got a number in it. I imagin it could be as simple as a ‘for loop’ that loops the amount of times there are rows, followed by an ‘if statement’ –

For loop(i)
if cell in column 1 == empty, remove row
i + 1

The problem is I have no idea how to program using the VPA, and would really appreciate the help from someone who does 😊 Thank you in advance for any responses.


What I'm trying to achive:
-Before




Sample Text

Sample Text
1
Sample Text

Sample Text
4
Sample Text

-After

1
Sample Text
4
Sample Text

It's worth noting the text at the bottom of the question doesn't appear in the table I expected it to, so just ignore the 'before' and 'after'.
Reply With Quote