#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default Substitute

Suppose if I have "1-2-3-4-5" or "12-1-34-56" in a cell. If there any formula
to retrieve only the number without the "-" in another cell.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Substitute

If you mean "1-2-3-4-5" in A1 and you want the real number: 12345 in B1
then place in B1: =SUBSTITUTE(A1,"-","")+0
Copy B1 down to return correspondingly if required

If you mean separate the "1-2-3-4-5" in A1 into 5 cols: 1,2,3,4,5
select col A, then click Data Text to column Delimited
In step 2, Type a dash: - in the "Other" box, click Finish
(ensure there's no data in cols B to E before you do the above)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"mrbalaje" wrote:
Suppose if I have "1-2-3-4-5" or "12-1-34-56" in a cell. If there any formula
to retrieve only the number without the "-" in another cell.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 860
Default Substitute

And one more. To change them in place use
find and replace
Find What: -
Replace With: leave box blank
Click Replace All

HTH
Martin


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
More than 7 IF? any substitute? Jean Excel Worksheet Functions 4 March 9th 07 05:41 AM
SUBSTITUTE Steved Excel Worksheet Functions 4 June 2nd 06 06:51 PM
Using &Chr$(39)& as substitute for ' in VBA Paul987 Excel Discussion (Misc queries) 4 March 15th 06 02:48 PM
substitute for = CEN7272 - ExcelForums.com Excel Worksheet Functions 3 August 15th 05 09:08 PM
substitute AMK Excel Worksheet Functions 1 June 13th 05 01:23 AM


All times are GMT +1. The time now is 03:30 PM.

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

About Us

"It's about Microsoft Excel"