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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
=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,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

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