Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Vic Vic is offline
external usenet poster
 
Posts: 117
Default Split value into 2 cells

I need to split the value of cell B 1067-234 into 2 cells. 1067 (numeric)
goes into cell A, and cell B will only retain 234 (numeric). What is the best
way to accomplish this? I will be doing this every day, so the most time
saving solution will be greatly appreciated. Thank you.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default Split value into 2 cells

If you have 1067-234 in B1 then in A1 use
a) if the hyphen is always in the fifth position, =--LEFT(B1,4)
b) if the hyphen could be anywhere =--MID(B1,1,FIND("-",B1)-1)
Note in both cases the double negation is used to convert text to number

A formula cannot alter another cell so we cannot alter B1
Let's insert a new column B so that 1067-234 is in C1
In B1 use
a) if the hyphen is always in the fifth position and foloowed by 3 digits,
=--MID(C1,6,3)
b) if the hyphen could be anywhere =--MID(C1,FIND("-",C1)+1,256)

Select A1:B1 (or A1:B100) if you are working with 100 rows of data) ; use
the Copy command followed by Edit | Paste Special with Values specified.
The formulas will be converted to values and the original data in column C
can be deleted

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email


"Vic" wrote in message
...
I need to split the value of cell B 1067-234 into 2 cells. 1067 (numeric)
goes into cell A, and cell B will only retain 234 (numeric). What is the
best
way to accomplish this? I will be doing this every day, so the most time
saving solution will be greatly appreciated. Thank you.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Split value into 2 cells

Select B1 and pull-down:

Data Text to Columns

specifiy the - as the separator and make A1 the destination.
--
Gary''s Student - gsnu200859


"Vic" wrote:

I need to split the value of cell B 1067-234 into 2 cells. 1067 (numeric)
goes into cell A, and cell B will only retain 234 (numeric). What is the best
way to accomplish this? I will be doing this every day, so the most time
saving solution will be greatly appreciated. Thank you.

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
How to Split the contents of cells across multiple cells anna New Users to Excel 5 May 29th 08 02:47 PM
Split cells Elaine New Users to Excel 3 April 21st 08 05:16 PM
how to split cells? wsijbesma New Users to Excel 1 June 3rd 06 09:09 AM
Split cells moglione1 Excel Discussion (Misc queries) 5 September 22nd 05 05:47 PM
split cells mwuttke Excel Discussion (Misc queries) 1 August 4th 05 07:31 PM


All times are GMT +1. The time now is 10:32 AM.

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"