Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel, how do I make cell text fit a pattern? 1

Status
Not open for further replies.

Grogo

MIS
Jun 28, 2001
11
US
Excel 2002 SP3

I am entering 12 character alpha-numeric data into a cell. I need to the data into 3 groups of 4 each seperated by a period. Is it possible to set a custom cell format so that when I paste the date into the cell it is formatted?

Example:
I have a MAC address with no hyphens or colons
00a0ff02000a

I paste it into the cell & I need it displayed as
00a0.ff02.000a

Any help would be greatly appreciated.

Thanks!

Grogo
 
In the Format Cells dialog box, go to the Numbers tab and choose Custom. In the Type box, remove whatever is in there and replace it with the following:
0000"."0000"."0000
 
Hmmm, I tried that but nothing changed at all.
 
My bad. Alpha chars not welcome. You will have to use a formula
 
Gizmo, I am pasting the data into the cell from a .txt file so there won't be a cell to reference. Is there any way to do this using Format Cells or Conditional Formatting?

Grogo
 
Bt if you are pasting from a text file you must be pasting to[b/] somewhere and as you said Excel 2002 I assume that's where it is going?
Once the data is in your Excel file then put the formula next to the data and voilla your format will be ****.****.**** in the new cell.
Formating text and numeric this was is tricky (but do-able I'd say but not by me I'm afraid)

Regards, Phil.

M.U.F.C. Show your true support here:
"Shares not Shirts
 
OK, I got it to work like that. I'll just hide the extra column. I was hoping for something like an input mask.

Thanks for your help Gizmo & Liliabeth!

Grogo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top