Moving Text To End Of String?

Nanogirl21

Active Member
Joined
Nov 19, 2013
Messages
331
Office Version
  1. 365
Platform
  1. Windows
Is there a formula to move a specific text within a cell to the end of the string?

For all rows in column W I would like to move “ / HOLD” to the end of the sting. If the cell does not have “ / HOLD” I would like to keep it as is.

I would like the results to be in column X.

Example:
[TABLE="width: 500"]
<tbody>[TR]
[TD="align: center"]CURRENT
[/TD]
[TD="align: center"]WANT
[/TD]
[/TR]
[TR]
[TD]APPLES 10
[/TD]
[TD]APPLES 10
[/TD]
[/TR]
[TR]
[TD]PINEAPPLE / HOLD 2
[/TD]
[TD]PINEAPPLE 2 / HOLD
[/TD]
[/TR]
[TR]
[TD]BANANAS 20
[/TD]
[TD]BANANAS 20
[/TD]
[/TR]
[TR]
[TD]CHERRIES / HOLD 20
[/TD]
[TD]CHERRIES 20 / HOLD
[/TD]
[/TR]
[TR]
[TD]BANANAS / HOLD 82
[/TD]
[TD]BANANAS 82 / HOLD
[/TD]
[/TR]
[TR]
[TD]GRAPES 23 DON'T WASH
[/TD]
[TD]GRAPES 23
[/TD]
[/TR]
[TR]
[TD]GRAPES / HOLD 352 WASH
[/TD]
[TD]GRAPES 352 WASH / HOLD
[/TD]
[/TR]
</tbody>[/TABLE]


Thank you for the help.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Unknown
AB
1CURRENTWANT
2APPLES 10APPLES 10
3PINEAPPLE / HOLD 2PINEAPPLE 2 / HOLD
4BANANAS 20BANANAS 20
5CHERRIES / HOLD 20CHERRIES 20 / HOLD
6BANANAS / HOLD 82BANANAS 82 / HOLD
7GRAPES 23 DON'T WASHGRAPES 23 DON'T WASH
8GRAPES / HOLD 352 WASHGRAPES 352 WASH / HOLD
Sheet9
Cell Formulas
RangeFormula
B2=IF(ISNUMBER(SEARCH("/ HOLD",A2)),SUBSTITUTE(A2,"/ HOLD","")&" / HOLD",A2)
 
Upvote 0

Unknown
AB
1CURRENTWANT
2APPLES 10APPLES 10
3PINEAPPLE / HOLD 2PINEAPPLE 2 / HOLD
4BANANAS 20BANANAS 20
5CHERRIES / HOLD 20CHERRIES 20 / HOLD
6BANANAS / HOLD 82BANANAS 82 / HOLD
7GRAPES 23 DON'T WASHGRAPES 23 DON'T WASH
8GRAPES / HOLD 352 WASHGRAPES 352 WASH / HOLD
Sheet9
Cell Formulas
RangeFormula
B2=IF(ISNUMBER(SEARCH("/ HOLD",A2)),SUBSTITUTE(A2,"/ HOLD","")&" / HOLD",A2)
 
Upvote 0
I just noticed in the example given: "GRAPES 23 DONT WASH" >>> "GRAPES 23"

Is that a typo or do you want "DONT WASH" removed from every string?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
Members
452,366
Latest member
TePunaBloke

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