Trim Function

kipper19

Board Regular
Joined
Apr 12, 2014
Messages
92
Office Version
  1. 365
Platform
  1. Windows
Hi all, I have the following data in Column A, I would to trim the data after the wording R1 or R2 or R3 etc etc and show it in column E, formula shown does work if the data in Colum A shows R1, how can i incorporate to show the trimmed data if the wording is not R1 and maybe R5

trim.jpg
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
How about
Excel Formula:
=TRIM(TEXTAFTER(A3,"R"&SEQUENCE(,9)))
 
Upvote 0
1235.xlsm
ABCD
1R1R2R3
210-Jube-23 1300m Hwavy 8 R1 RTG66+RTG66+  
310-Jube-23 1300m Hwavy 8 R2 RTG66+ RTG66+ 
410-Jube-23 1300m Hwavy 8 R3 RTG66+  RTG66+
Sheet4
Cell Formulas
RangeFormula
B2:D4B2=IFERROR(TRIM(MID($A2, SEARCH(B$1, $A2) + 2, LEN($A2))),"")

1235.xlsm
ABCD
1R1R2R3
210-Jube-23 1300m Hwavy 8 R1 RTG66+RTG66+  
310-Jube-23 1300m Hwavy 8 R2 RTG66+ RTG66+ 
410-Jube-23 1300m Hwavy 8 R3 RTG66+  RTG66+
Sheet4
Cell Formulas
RangeFormula
B2:D4B2=IFERROR(TRIM(MID($A2, SEARCH(B$1, $A2) + 2, LEN($A2))),"")

Muhammed, thanks for the reply, that would work but i need all of the results to show only in Column B
 
Upvote 0
How about
Excel Formula:
=TRIM(TEXTAFTER(A3,"R"&SEQUENCE(,9)))
Fluff, appreciate your time but my excel does not support the TextAfter function, using Office and Home 2019
 
Upvote 0
Apologies, Im using this on my laptop with a different system, I should have stipulated which version in the original post
 
Upvote 0
Then this would be an alternative to using the textsplit:
Excel Formula:
=CONCAT(IFERROR(MID(A2,FIND("R"&ROW($1:$99),A2)+LEN(ROW($1:$99))+2,LEN(A2)),""))
 
Upvote 0

Forum statistics

Threads
1,215,112
Messages
6,123,162
Members
449,099
Latest member
afishi0nado

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