Using 'Right' and 'Left' formulas - maybe(?)

joelexcel

New Member
Joined
Apr 8, 2015
Messages
6
Needing to get these 7 digit numbers on their own, thinking it's a combination of the Left and Right formulas

Number of characters is not constant so preferably wanting to trigger on the _ (underscores).

Any help greatly appreciated


ABC_1010101_LOLL_A_Group1
ABC_1010301_LOLL_A_Group2
BBC_1010121_LOLL_A_Group3
ABC_1310101_LOLL_A_Group4
ABC_1010501_LOLL_A_Group5
ABC_1013101_LOLL_A_Group6
AAC_1014101_LOLL_A_Group7
ABC_1010181_LOLL_A_Group8
ABC_2010101_LOLL_A_Group9
ABC_6010101_LOLL_A_Group10
ACC_1010101_LOLL_A_Group11
ABC_1040101_LOLL_A_Group12

<colgroup><col></colgroup><tbody>
</tbody>


If anything further needed to address, please advise.

Kind regards
Joel
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
please try
=MID(A1,FIND("_",A1)+1,7)
 
Last edited:
Upvote 0
please try
=MID(A1,FIND("_",A1)+1,7)


Hi Takae, thank you for that, that works

What if the what if the number of characters for the numbers differ, e.g.

ABC_10101051_LOLL_A_Group1
ABC_10101_LOLL_A_Group2
BBC_1010222121_LOLL_A_Group3
ABC_131012201_LOLL_A_Group4
ABC_10888810501_LOLL_A_Group5
ABC_101301_LOLL_A_Group6
AAC_1014101_LOLL_A_Group7
ABC_1010181_LOLL_A_Group8

<colgroup><col></colgroup><tbody>
</tbody>


Is there are way to count the characters based on numbers of characters between the _'s? Another 'Find' inside a 'Len' maybe?


Cheers
Joel
 
Upvote 0
Is this ok?

=LEFT(MID(A1,FIND("_",A1)+1,100),FIND("_",MID(A1,FIND("_",A1)+1,100))-1)
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

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