Forum Discussion
Krishneel Nair
Nov 19, 2018Copper Contributor
Deleting rows conditionally
I am trying to automate a particular function in Ms Excel 2013 (and later). The details are as follows:
If a particular field has a particular string, I would like the entire row to be deleted.
The field has custom string (text) so its able to accept everything, however, if a certain string appears, lets assume the string is "he did it". if that appears as part of the string in that one field, action should delete the entire row.
The question is, what is the best approach to implement that. Is it using VBA (or Macros) or could this be done without VBA.
In addition, could the same be done using an app done in C#, if so, how??
5 Replies
Sort By
- Lorenzo KimBronze Contributor
- Krishneel NairCopper ContributorHey, the code works well with the file you have attached. However, it doesn't really work with what I have in place. My field of concern is the between E-I, this is where the string will be checked, and the needful should be done
- Lorenzo KimBronze Contributordo you mean to check rows between Columns E to I?
to check these 5 columns if any one of them contains the word - delete the entire row?
- Lorenzo KimBronze Contributorbefore testing - make a backup copy of your work...