Populate a Cell Based on Part of Another Entry...

SMAsh67

New Member
Joined
Jan 8, 2018
Messages
18
This works perfectly for populating a cell with everything left of the first _.


Code:
=IFERROR(LEFT(B11,FIND("_",B11)-1),"")

I was wondering, is there a way to make it show everything after the last "_"? I've been messing with it but I just can't get it to work.


The file names are never the same length. For example:


random name_17075496309_9863-7-3_9-36-27_GMC
thisone here_98634961630_1213-9-10_11-53-59_NC


But they always have 4 underscores. What is after the last underscore varies from 2 to 3 letters.


Some help would be greatly appreciated!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
=right(a1,len(a1)-find("~",substitute(a1,"_","~",len(a1)-len(substitute(a1,"_","")))))

or

=TRIM(RIGHT(SUBSTITUTE(A1,"_",REPT(" ",99)),99))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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