Extract Numbers and Text

ChetanPuri

Board Regular
Joined
Sep 5, 2018
Messages
70
Office Version
  1. 365
Platform
  1. Windows
Hi Excel Gurus

Is there a way where we can extract numbers from text but if there are no numbers we extract only text from the cell.

Many thanks
Regards
Chetan
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
If you could show us some sample data and the results you want from then (so we don't have to guess), that would be helpful.
 
Upvote 0
If you could show us some sample data and the results you want from then (so we don't have to guess), that would be helpful.
Thank you Rick, in column K, I want to extract Specific text such as L5.3 Column J (Row 8), if there's no number such as "Salary", I want it to return salary

Triennium Ops ^L0 Salaries Budget 24-26 V3 - 12 Sep 2023.xlsx
JK
1Pay Rate Level
2SALARY
3SALARY
4SALARY
5SALARY
6SALARY
7SALARY
8SCHADS L5.3
9SCHADS L6.3
11SALARY
12SALARY
13SCHADS L6.3
14SCHADS L5.2
15SCHADS L6.2
Salary Forecast-Updated Aug23
 
Upvote 0
Maybe your sample data is not representative enough but for that data you could try this.

24 03 07.xlsm
JK
1Pay Rate Level
2SALARYSALARY
3SALARYSALARY
4SALARYSALARY
5SALARYSALARY
6SALARYSALARY
7SALARYSALARY
8SCHADS L5.3L5.3
9SCHADS L6.3L6.3
10 
11SALARYSALARY
12SALARYSALARY
13SCHADS L6.3L6.3
14SCHADS L5.2L5.2
15SCHADS L6.2L6.2
ChetanPuri
Cell Formulas
RangeFormula
K2:K15K2=TEXTAFTER(J2," ",,,,J2)
 
Upvote 0
=TEXTAFTER(J2," ",,,,J2
Maybe your sample data is not representative enough but for that data you could try this.

24 03 07.xlsm
JK
1Pay Rate Level
2SALARYSALARY
3SALARYSALARY
4SALARYSALARY
5SALARYSALARY
6SALARYSALARY
7SALARYSALARY
8SCHADS L5.3L5.3
9SCHADS L6.3L6.3
10 
11SALARYSALARY
12SALARYSALARY
13SCHADS L6.3L6.3
14SCHADS L5.2L5.2
15SCHADS L6.2L6.2
ChetanPuri
Cell Formulas
RangeFormula
K2:K15K2=TEXTAFTER(J2," ",,,,J2)
Thank you so much, Is there a possibility, I don't get text after .3 for example only L5 or L4 etc. Many thanks
 
Upvote 0
Maybe this...
Excel Formula:
=TEXTBEFORE(TEXTAFTER(J13," ",-1,,,J13)&".",".")
Edit Note: I modified my original formula by adding the -1 which would allow the formula to still work even if the beginning text had spaces in it.
 
Last edited:
Upvote 0
Maybe this...
Excel Formula:
=TEXTBEFORE(TEXTAFTER(J13," ",-1,,,J13)&".",".")
Edit Note: I modified my original formula by adding the -1 which would allow the formula to still work even if the beginning text had spaces in it.
Thank you so much
 
Upvote 0
You're welcome. Glad we could help. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,223,243
Messages
6,170,971
Members
452,371
Latest member
Frana

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