Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default custom format cell with text and numbers

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default custom format cell with text and numbers

Well, you could use a formula if AA111122223 never changes the number of
characters.

Assume AA111122223 is in A1.
=concatenate(left(a1,2),"-",mid(a1,4,4),"-",mid(a1,7,4),"-",right(A1,1))

Dave
--
Brevity is the soul of wit.


"maryj" wrote:

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default custom format cell with text and numbers

In a helper cell:

=LEFT(A1,2) & "-" & MID(A1,3,4) & "-" & MID(A1,6,4) & "-" & RIGHT(A1,1)

--
Gary's Student


"maryj" wrote:

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj

  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default custom format cell with text and numbers

IN a helper column put this and copy down.........

=LEFT(A1,2)&"-"&MID(A1,3,4)&"-"&MID(A1,6,4)&"-"&RIGHT(A1,1)

Vaya con Dios,
Chuck, CABGx3



"maryj" wrote:

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default custom format cell with text and numbers

If the string always starts with AA and is always 9 characters, you could use a
custom format:

"AA-"0000-0000-0

If the first two letters can vary, but the total string is always 11 characters
(without the dashes), you could use one column for data entry and another cell
to make it look pretty:

=left(a1,2)&"-"&mid(a1,3,4)&"-"&mid(a1,7,4)&"-"&right(a1,1)

You could actually have an event macro that runs and modifies the input as soon
as the user hit enter.

maryj wrote:

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default custom format cell with text and numbers

Thanks to all.
--
maryj


"Dave F" wrote:

Well, you could use a formula if AA111122223 never changes the number of
characters.

Assume AA111122223 is in A1.
=concatenate(left(a1,2),"-",mid(a1,4,4),"-",mid(a1,7,4),"-",right(A1,1))

Dave
--
Brevity is the soul of wit.


"maryj" wrote:

Client needs to change existing values from AA111122223 to AA-1111-2222-3. Is
there any way to do this with custom formatting? Or what other options might
there be? Thanks!
--
maryj

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Format Cell nastech Excel Discussion (Misc queries) 13 April 28th 06 08:31 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Change CSV-load cell format from GENERAL to TEXT for numbers? Morena Chris Matthews Excel Discussion (Misc queries) 1 October 14th 05 05:23 PM
Format a cell with numbers and user defined text Rod R. Excel Discussion (Misc queries) 0 March 30th 05 04:31 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 01:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"