Need excel formulae to get first character than all data upto length as 8

suraj8888

New Member
Joined
Feb 3, 2024
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi ,

Want Regex in excel formulae as mention below input and output for reference.

InputOutput
3005AB1394714000000AB139471
2022ABR52447FPVABR52447
2022A9561554PPVA9561554
2022ABR52240LTWABR52240
2022PAR45939FPVPAR45939
2022PNN03733FPVPNN03733
2019Z6167512Z6167512
3895EU864DHI97554
DHI97554
3005O23243918900000O2324391
30052011624051B10000004391B1000000
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi and welcome to MrExcel.


Try:
Excel Formula:
=LET(p,A2,MID(p,MATCH(TRUE,ABS(CODE(MID(UPPER(p),SEQUENCE(LEN(p)),1))-77.5)<13,0),8))

Reference:
 
Upvote 0
In case there are no letters in the cell:

Excel Formula:
=IFERROR(LET(p,A2,MID(p,MATCH(TRUE,ABS(CODE(MID(UPPER(p),SEQUENCE(LEN(p)),1))-77.5)<13,0),8)),"")
 
Upvote 0
It's clearly not just based on first letter because this value doesn't have an expected value starting with EU

3895EU864DHI97554
DHI97554
 
Upvote 0
If that's a mistake in the original post, then this should work:
=MID(A2,MIN(IFERROR(FIND(CHAR(64+SEQUENCE(26)),A2),1000)),8)
 
Upvote 1

Forum statistics

Threads
1,216,119
Messages
6,128,947
Members
449,480
Latest member
yesitisasport

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