ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Remove leading Numbers from text (https://www.excelbanter.com/excel-worksheet-functions/20112-remove-leading-numbers-text.html)

DBLWizard

Remove leading Numbers from text
 
Howdy All,

I am trying figure out a way to remove the front portions of a cell if
the cell starts with numbers. If it doesn't I just want to copy the
text.

I have the function to remove the numbers(well actually up to the first
space) but it works for what I want.

=TRIM(MID(C2,FIND(" ",C2),LEN(C2)-FIND(" ",C2)))

But I can't figure out a way to do this without using VBScript and the
client doesn't want that enabled in the files.

Is there any function in Excel that will tell you if a character is
numeric or not? If so then I could do it with an inline IF statement
but I haven't been able to find one.

Thanks

dbl


DBLWizard

I forgot to include a sample of the text. Here is what 2 different
rows would look like:

3.1.2(a) Does the INFOSEC policy have an owner who is responsible for
reviewing it according to a defined review process & updating it as
needed?

How often are reviews of the policy's effectiveness conducted? (based
on the nature, number & impact of recorded security events)

I want to truncate off the 3.1.2(a) in the first one and leave the
second alone.

thanks

dbl


Jason Morin

Try:

=IF(ISNUMBER(LEFT(A1)*1),MID(A1,FIND(" ",A1)+1,1024),A1)

HTH
Jason
Atlanta, GA

-----Original Message-----
Howdy All,

I am trying figure out a way to remove the front

portions of a cell if
the cell starts with numbers. If it doesn't I just want

to copy the
text.

I have the function to remove the numbers(well actually

up to the first
space) but it works for what I want.

=TRIM(MID(C2,FIND(" ",C2),LEN(C2)-FIND(" ",C2)))

But I can't figure out a way to do this without using

VBScript and the
client doesn't want that enabled in the files.

Is there any function in Excel that will tell you if a

character is
numeric or not? If so then I could do it with an inline

IF statement
but I haven't been able to find one.

Thanks

dbl

.



All times are GMT +1. The time now is 09:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com