How to separate text in cell on 2 digit blocks using the separator ":"
Example:
Cell A1 --> 0040CA69402E
Cell A2 will be --> 00:40:CA:69:40:2E
How to separate text in cell on 2 digit blocks using the separator ":"
Example:
Cell A1 --> 0040CA69402E
Cell A2 will be --> 00:40:CA:69:40:2E
Oleg
I'm frustrated...
I've written two formulae which are not necessarily the best way of doing this - the point is that they are copyable - I'm sure I should be able to combine the logic into an array formula - instead of an ugly "left(x,2)" & ":" & (mid(x,3,2)) &...
Of course, this works...
=LEFT(A3,2)&":"&MID(A3,3,2)&":"&MID(A3,5,2)&":"&MID(A3,7,2)&":"&MID(A3,9,2)&":"&MID(A3,11,2)
but it ain't pretty
Any legends able to make the array formula I'm sure exists?
HTH
Probably, there is a better way...but this for starters:
![]()
Please Login or Register to view this content.
Where there is a will there are many ways.
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Actually, if you install the free addin called Morefunc...(http://xcell05.free.fr/morefunc/english/) and use the MCONCAT() function, then you can use this array formula:
where A2 contains the code to parse.![]()
Please Login or Register to view this content.
edit: This formula also accomodates for any even-lengthed code
Last edited by NBVC; 09-24-2008 at 11:52 AM.
Hi Here's a UDF.
Right click sheet "Tab", Select "View Code", From Vb Window Select "Insert", "Module". Paste in new window.
To Run, Enter in cell:- =Colon(), (Select Cell with Data to go in Brackets)
Regards Mick![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks