Extracting numbers until i reach a letter

Kaypea

New Member
Joined
Nov 28, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi,

I work with references that look like this 38293883M34D345 or 07586A484T45. there is a mixture of letters and numbers. i would like to have a formula that will only pick up the numbers before the first letter regardless of how many numbers there are. Like the 38293883 or 07586 from those references.

We receive a spreadsheet with these references on and only need the first set off numbers before the first letter. I have tried a couple of formulas and they seem to still include the letter and some numbers after.

I dont have access to VBA to use at my place of work. I am a novice in regards to excel but try and make my life easier. Please could someone assist with this?

Thank you
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Excel Formula:
=LEFT(A1,MATCH(TRUE,ISERROR(VALUE(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1))),0)-1)
 
Upvote 0
Or try this:

Excel Formula:
=LET(letters, CHAR(SEQUENCE(26, , 65)), TEXTBEFORE(A2&"A", letters))
 
Upvote 0
A shorter version of Phuoc's

=TEXTBEFORE(A2&"A", CHAR(SEQUENCE(26, , 65)))
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

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