A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

how to include dash within a cell



 
 
Thread Tools Display Modes
  #1  
Old March 29th, 2007, 02:30 PM posted to microsoft.public.excel.worksheet.functions
Accounts jobs
external usenet poster
 
Posts: 1
Default how to include dash within a cell

If anyone can help me in this I would be very greatful

We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.

  #2  
Old March 29th, 2007, 02:51 PM posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
external usenet poster
 
Posts: 2,468
Default how to include dash within a cell

If your text is always 3 characters, then one way:

=LEFT(A1,3) & "-" & MID(A1,4,255)

where 255 is just a big number to ensure all the digits are captured.

In article .com,
"Accounts jobs" wrote:

If anyone can help me in this I would be very greatful

We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.

  #3  
Old March 29th, 2007, 02:56 PM posted to microsoft.public.excel.worksheet.functions
Toppers
external usenet poster
 
Posts: 3,081
Default how to include dash within a cell

If they are of a fixed format:

=LEFT(A1,3) &"-"& RIGHT(A1,4)

"Accounts jobs" wrote:

If anyone can help me in this I would be very greatful

We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.


  #4  
Old March 29th, 2007, 02:56 PM posted to microsoft.public.excel.worksheet.functions
Teethless mama
external usenet poster
 
Posts: 3,722
Default how to include dash within a cell

If your text always begin with TND then try this:

Select your data range then go to...
Edit Replace Find what: TND Replace with: TND- Replace All


"Accounts jobs" wrote:

If anyone can help me in this I would be very greatful

We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.


  #5  
Old March 29th, 2007, 03:04 PM posted to microsoft.public.excel.worksheet.functions
Ron Coderre
external usenet poster
 
Posts: 620
Default how to include dash within a cell

If you ALWAYS need the dash inserted between
the 3rd and 4th characters ....

try something like this:

=REPLACE(A1,1,3,LEFT(A1,3)&"-")

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Accounts jobs" wrote:

If anyone can help me in this I would be very greatful

We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.


  #6  
Old March 29th, 2007, 05:33 PM posted to microsoft.public.excel.worksheet.functions
meatshield
external usenet poster
 
Posts: 24
Default how to include dash within a cell

To be on the safe side, you could just use
=LEFT(A1,3) & "-" & MID(A1,4,Len(A1))

On Mar 29, 9:51 am, JE McGimpsey wrote:
If your text is always 3 characters, then one way:

=LEFT(A1,3) & "-" & MID(A1,4,255)

where 255 is just a big number to ensure all the digits are captured.

In article .com,
"Accounts jobs" wrote:

If anyone can help me in this I would be very greatful


We receive a list of codes like "TND4567". We manually put the dash
between the text and numbers. is there any way of doing it through a
formula in excel.



  #7  
Old March 29th, 2007, 09:20 PM posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
external usenet poster
 
Posts: 2,468
Default how to include dash within a cell

True, but I hesitate to add the overhead of another function where it's
not needed. The recalc would be much faster using

MID(A1,4,32763)




In article . com,
"meatshield" wrote:

To be on the safe side, you could just use
=LEFT(A1,3) & "-" & MID(A1,4,Len(A1))

On Mar 29, 9:51 am, JE McGimpsey wrote:
If your text is always 3 characters, then one way:

=LEFT(A1,3) & "-" & MID(A1,4,255)

  #8  
Old March 29th, 2007, 09:40 PM posted to microsoft.public.excel.worksheet.functions
meatshield
external usenet poster
 
Posts: 24
Default how to include dash within a cell

You make a good point. =)

On Mar 29, 4:20 pm, JE McGimpsey wrote:
True, but I hesitate to add the overhead of another function where it's
not needed. The recalc would be much faster using

MID(A1,4,32763)

In article . com,

"meatshield" wrote:
To be on the safe side, you could just use
=LEFT(A1,3) & "-" & MID(A1,4,Len(A1))


On Mar 29, 9:51 am, JE McGimpsey wrote:
If your text is always 3 characters, then one way:


=LEFT(A1,3) & "-" & MID(A1,4,255)



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:32 PM.


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