Remove all Numbers from list

Excel1991

Board Regular
Joined
Aug 1, 2018
Messages
58
Hi all,

I have a list in excel that looks similar to this:

ROBBY
18205
19206
GEORGE
16573
ANDERSON
23456
26752
47658

<tbody>
</tbody>

I am trying to get the list so that it looks as follows:
ROBBY
ROBBY
ROBBY
GEORGE
GEORGE
ANDERSON
ANDERSON
ANDERSON
ANDERSON

<tbody>
</tbody>

I was thinking I could try and remove all the numbers and then do a formula to fill the text down until it reaches the next filled cell. Anyone know how to do this or if there is an easier way? Thanks!
 
Last edited:
Glad to help & thanks for the feedback
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
If the answer to the above question is yes, then try
Code:
Sub Excel1991()
    With Range("A2", Range("A" & Rows.Count).End(xlUp))
        .Value = Evaluate(Replace("if(isnumber(--mid(@,2,1)),"""",@)", "@", .Address))
        .SpecialCells(xlBlanks).FormulaR1C1 = "=r[-1]c"
        .Value = .Value
    End With
End Sub
You can compact your code slightly by putting the R1C1 formula inside the Evaluate function call and removing the SpecialCells code line completely (the Value property can receive a formula value directly)...
Code:
Sub Excel1991()
    With Range("A2", Range("A" & Rows.Count).End(xlUp))
        .Value = Evaluate(Replace("if(isnumber(--mid(@,2,1)),""=r[-1]c"",@)", "@", .Address))
        .Value = .Value
    End With
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,533
Messages
6,120,076
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top