Andreas Hermle
asked on
Delete rows whenever cells in the first column of tables start with a specific string (using VBA)
Dear Experts:
My current document features several tables.
There are cells in the first column of the tables that start with the string 'X_'
I would like to run a macro that deletes the whole row whenever table cells in the first column start with that string 'X_'
The macro is to tell in a Msgbox how many rows have been deleted, if any.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
My current document features several tables.
There are cells in the first column of the tables that start with the string 'X_'
I would like to run a macro that deletes the whole row whenever table cells in the first column start with that string 'X_'
The macro is to tell in a Msgbox how many rows have been deleted, if any.
Help is much appreciated. Thank you very much in advance.
Regards, Andreas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You're welcome Andreas! Glad we could help.
ASKER
both solutions work just fine, thank you very much for it.
I can learn from both :-)
Since Rgonzo (Rafael) was quicker and his code is more concise, I suggest awarding him the most points.
It is always hard for me to award points ...
Thank you very much for your great and professional help.
Regards, Andreas