How to delete all lines starting with a number in Microsoft Word or Microsoft Excel

I'm going to make a two assumptions about your question.

  1. You are referring to an Excel spreadsheet or a table within Word.
  2. Your reference to "lines" means Excel/Word table rows.

To remove the rows that contain a number in a specific column:

Method 1:

  1. Sort your data (both in Excel and Word) based on the column with the number. (The rows with the number will appear at the top.)
  2. Select the first row to be deleted and hold the shift key down and select the last row to be deleted.
  3. Press the delete button on your keyboard, or right-click one of the selected rows and click Delete - entire row.

Method 2:

  1. Use CTRL+F to find the value (selecting Find All). The rows containing that value will be highlighted.
  2. Press the delete button on your keyboard, or right-click one of the selected rows and click Delete - entire row.

In excel:

  • Paste your list to column a (start at a1)
  • Paste this formula in b1: =IF(IFERROR(ABS(LEFT(A1)),'x')='x',A1,'')
  • Auto populate. Now, you find your list without strings starting with a number in column b.

Quick explanation of the function:

LEFT(A1) gives you the first sign of the string in A1

ABS() tries to format this value in an numbers. Gives error if sign is not a number.

IFERROR() sets an alternative value when a formula ends up in an error, in this case it's the value 'x')


States that if the ouput of the test is 'x' (thus the test produced an error, thus the first sign of the string is not a number) then, paste the value of A1, else (if it starts with a number) leave it empty.

Edit: I think that there's also a way using it as =IF(ISNUMBER(LEFT()...

Not easy, huh?

Word's wildcard matching doesn't seem capable, so I recommend you do what the pros do... cheat.

In Excel, introduce a new column ("seq") and number it sequentially. This column retains your original order.

Now sort on your column. Numbered guys typically will appear at the top.

Delete all the numbered rows.

Sort on "seq"

Delete the "seq" column.

Or, if you wanted to automate it...

Public Sub nukeNumericRows(ByVal testColumn As Long)
Dim RN As Long			' Row Number
Dim RNmax As Long
Dim xlS As Excel.Worksheet
Dim s As String

Const startAtRow = 2    ' I'm guessing there's a header row, if not make this a one

  Set xlS = ActiveSheet
  RN = startAtRow
  RNmax = xlS.UsedRange.Rows.Count
  While RN <= RNmax
    s = Left(xlS.Cells(RN, testColumn).Text, 1)
    If IsNumeric(s) Then
      ' delete this row
      ' note the we do NOT increment RN here... instead
      RNmax = RNmax - 1
      RN = RN + 1		' Next!
    End If
  MsgBox "Done it!"
End Sub

Assuming your column with the leading numers is in column A of the active worksheet, then typing:

What is the best phone case for the iPhone Xs?

If you are looking for a Best Cases which protects your phone as well as change the look of your phone completely then I suggest You to go with Designer Mobile cases , they actually describes you as you will choose the best one which suits

Should driverless cars be allowed?

Oh Yes!!! Driverless cars will be more safe moving and remove the pain of driving and they are going to be the future.As a first step, Tesla Model S is on the verge of making fullt automated car. Currently they have a Auto