0

I have a single column of text in Excel that is to be used for translating into foreign languages. The text is automatically generated from an InDesign File. I would like to clean it up for the translator by removing rows that simply contain a number ("20", 34.5" etc), or if they contain a measurement "5mm", "3.5 µm", etc. I've found many posts (see link below) on how to remove a row with specific string, but none that use search strings, such as those I typically use with GREP searches: "\d+" and "\d.\d µm" How would I do this? I am on Mac iOS if that helps.

Note that I would need to delete the row if the cell only contains a number or a measurement, not if the number is contained within a phrase, sentence, or paragraph, etc.

https://stackoverflow.com/a/30569969

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
ratsurfer
  • 11
  • 3

2 Answers2

0

It may not be what you are looking for, but how about just sorting the column and remove the rows starting with numbers? It is a manual approach but from what I understand this translation process only happens from time to time. Am I right?

finny
  • 21
  • 7
  • I've tried that, but for this project I need to keep the text in the same order it arrived--translations work better when there's context. Ultimately I'd like to make this a macro with some other clean-up functions so that nine other non-excel users can process them in a single click. We will have hundreds of files like this that we have to process. – ratsurfer Jul 14 '17 at 19:17
0

I see two possible issues in your question:

  • How to work with regular expressions in Excel?
  • How to delete rows in a loop?

Let me start with the second question: when you want to create a for-loop in order to remove items from a list, you MUST start at the end and go back to the beginning (it's a beginner's trick, but a lot of people trip over it.
About the first question: this is a very useful post about this subject, it's too large to even give a summary here.

Dominique
  • 16,450
  • 15
  • 56
  • 112
  • Thanks for the tip. I actually hired someone to write a a very useful script to solve the issue, but thanks for the tip on where to find REGEX to help me select out more complex strings. – ratsurfer Jul 06 '20 at 17:30