Excel. Placing Colon.

alliswell

Board Regular
Joined
Mar 16, 2020
Messages
190
Office Version
  1. 2007
Platform
  1. Windows
  2. Mobile
Hi everybody
I have some texts and numbers in column A. I want to place ":" sign after first 3 characters and before last two characters. How can i ? I tried with cell format but failed.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You can't format cells that contain text, only numbers or numeric values.
 
Upvote 0
@alansidman you don't need to split the string to insert characters with a formula, just replace 0 characters with the text to insert.

=REPLACE(A2,4,0,":")
 
Upvote 0
@jasonb75

Isn't it great that we all have different ideas pop into our heads at different times so that the OP can have multiple ways to solve their issues.

Alan
 
Upvote 0
Alan, apologies if my post came across as being facetious, I wasn't sure if you were aware of the method. In all honesty it was something that I tried once, not expecting it to work.

I just realised that I missed the part about adding a second colon at the end of the string, this will correct that.

=REPLACE(REPLACE(A2,LEN(A2)-1,0,":"),4,0,":")

I think that it might get a bit messy with any more than 2 additional strings though.
 
Upvote 0
Thanks Dear Jason. No appologizes. You r gr8. all mrexcel are gr8
 
Upvote 0
Hello alansidman and jason. Thanks for solving my query. can you explain what does -5 and -1 mean ?
 
Upvote 0
Sir i have entered time in A1 by formula =now() and cell format to h:mm. Is there anyway to convert it in text so that the time doesnt update.
Thanks
 
Upvote 0

Forum statistics

Threads
1,214,566
Messages
6,120,257
Members
448,952
Latest member
kjurney

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