How do I remove 2 pipe bars and replace one with a hyphen?

Marq

Well-known Member
Joined
Dec 13, 2004
Messages
914
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
I have hundreds of entries in a column (H) which are work order numbers that have two pipe bars in them. I would like to remove the pipe bars all at once and insert a hyphen.

It looks like this: 12345678|0010|

I need it to look like this: 12345678-0010

Is there a "format cell" custom I can make?? or a control H replace option???.. or would it require a formula?

not all entries start with eight numbers before the first bar..some start with seven...but i only need to work with the ones that start with eight numbers.

Can someone please help me out?
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
How about
Libro1
AB
1
212345678|0010|12345678-0010
3
Hoja1
Cell Formulas
RangeFormula
B2B2=SUBSTITUTE(SUBSTITUTE(A2,"|","-",1),"|","")
 
Upvote 0

Forum statistics

Threads
1,214,881
Messages
6,122,074
Members
449,064
Latest member
MattDRT

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