#1   Report Post  
Posted to microsoft.public.excel.misc
RKS RKS is offline
external usenet poster
 
Posts: 63
Default format split

Hi
I have one big excel sheet. in this sheet one column use many custom format.
when i type any number that column, unit display with number. for example;

A B C
100 pcs
50 LTR
200 carton
60 pcs
....

in column A use many cutom format like ""0" PCS" , ""0" LTR"

I wants split number and unit in column B and C

PLease help me urgently

RKS
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default format split

First, we need a user defined function to extract the cell format. Open up
the VBE (Alt+F11) and goto insert - module. Paste the following in:

'=======
Function MyFormat(Reference As Range) As String
MyFormat = Reference.NumberFormat
End Function
'=======

Back in your workbook, the formula in column B is:
=A2
Formula in column C:
=SUBSTITUTE(MID(MyFormat(A2),4,999),"""","")
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"RKS" wrote:

Hi
I have one big excel sheet. in this sheet one column use many custom format.
when i type any number that column, unit display with number. for example;

A B C
100 pcs
50 LTR
200 carton
60 pcs
...

in column A use many cutom format like ""0" PCS" , ""0" LTR"

I wants split number and unit in column B and C

PLease help me urgently

RKS

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15
Default format split

I have two options for you which may vary depending on which version you are
running.

1) If all the data is entered in Column A and you just need to fill in B & C
there is an option under Data- Text to Columns. Using this wizard it will
split your data into columns.

2) If you need columns B & C to update as you are entering A:
Column B formula: =LEFT(A1,SEARCH(" ",A1,1))
Column C formula: =RIGHT(A1,LEN(A1)-SEARCH(" ",A1,1))
Note that these formulas are grabbing the left and right data based on the
space (" ") if you enter an item such as "John M. Doe" it will not pull it
properly.

"RKS" wrote:

Hi
I have one big excel sheet. in this sheet one column use many custom format.
when i type any number that column, unit display with number. for example;

A B C
100 pcs
50 LTR
200 carton
60 pcs
...

in column A use many cutom format like ""0" PCS" , ""0" LTR"

I wants split number and unit in column B and C

PLease help me urgently

RKS

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
Split Ashwini Excel Discussion (Misc queries) 1 September 15th 09 12:12 PM
Split a cell diagonally and apply a different conditional format. Champ Excel Worksheet Functions 2 February 5th 09 06:38 PM
How do I remove split a split window? Norm New Users to Excel 3 July 19th 08 10:31 PM
2nd split Kevin Excel Discussion (Misc queries) 4 August 17th 07 04:47 PM
Split box ED New Users to Excel 1 April 27th 06 09:43 PM


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