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:
CURRENT
WANT
APPLES 10
APPLES 10
PINEAPPLE / HOLD 2
PINEAPPLE 2 / HOLD
BANANAS 20
BANANAS 20
CHERRIES / HOLD 20
CHERRIES 20 / HOLD
BANANAS / HOLD 82
BANANAS 82 / HOLD
GRAPES 23 DON'T WASH
GRAPES 23
GRAPES / HOLD 352 WASH
GRAPES 352 WASH / HOLD

<tbody>
</tbody>


Thank you for the help.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

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,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