Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 39
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)



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
I need to add a dash five characters from the first in a cell Angela Excel Discussion (Misc queries) 5 March 6th 07 01:41 AM
Remove dash in cell dyukon Excel Discussion (Misc queries) 3 January 19th 06 04:52 PM
understanding dash dash in a excel formula ldebner Excel Worksheet Functions 2 October 31st 05 01:47 PM
how do i stop excel from changing a dash to a zero in a cell? green51 Excel Worksheet Functions 1 October 29th 05 01:46 AM
Find an empty cell and put a dash in it? markexcel Excel Worksheet Functions 5 October 12th 05 03:47 PM


All times are GMT +1. The time now is 08:21 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"