+ Reply to Thread
Results 1 to 21 of 21

Split up number

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Split up number

    Hello:

    I have number in cell A2=1.14.
    How would i split it up so that B2 = 1, c2=14

    Let me Know if you have any questions.
    Thanks.
    Riz
    Last edited by rizmomin; 02-16-2014 at 11:07 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Split up number

    1 way would be to use Text2Columns - use . as the delimter

    or
    B2=--left(A2,1)
    C2=--mid(a2,3,2)

    I think you would need to provide additional samples for a better suggestion though
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,111

    Re: Split up number

    INT(A2)
    would give the integer
    Mode(A2,1)
    would give you the fraction decimal part
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split up number

    I think based on OP requirements the MOD should be

    =MOD(A2,1)*100
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hello Guys:

    Thanks formula works.
    Riz

  6. #6
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split up number

    Appreciate your feedback!

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Split up number

    Which formula worked for you?

    I saw a point "." at the end and figured we were working with text

  8. #8
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hello Guys:

    It seems to be not working..please help

    A2=12.14, please help split this up B2=12 and C2=14

    Thanks again

    Riz

  9. #9
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,111

    Re: Split up number

    what does
    =MOD(A2,1)*100
    give ?

    maybe attach the spreadsheet

  10. #10
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hello etaf:

    Please refer to attached sheet.
    I have created formula in cell c17:C19 and also correct answers are shown in cell E17:E19.

    Let me Know if you have any questions.
    Thanks.
    Riz
    Attached Files Attached Files

  11. #11
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split up number

    Quote Originally Posted by rizmomin View Post
    Hello Guys:

    It seems to be not working..please help

    A2=12.14, please help split this up B2=12 and C2=14

    Thanks again

    Riz

    Fro the first part

    =INT(A2) will give you 12

    For the second part:

    =MOD(A2,1)*100 will give you 14

    if you need 0.14

    =MOD(A2,1)

  12. #12
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,111

    Re: Split up number

    i dont understand how the question of splitting up a number - works in the spreadsheet you posted ?

  13. #13
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hi etaf:

    If the number is lets say 1.00, 1.14 then it would work.
    But if the number is 12.00, 12.14 then it seems to work.
    Let me Know if you have any questions.
    Thanks.
    Riz

  14. #14
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Split up number

    Please see attached file
    Attached Files Attached Files

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Split up number

    Try:
    =IF(MOD(A17,1)=0,SUMPRODUCT((INT($C$3:$C$8)=A17)*$I$3:$I$8),SUMPRODUCT(($C$3:$C$8=A17)*$I$3:$I$8))
    Quang PT

  16. #16
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hi Guys/Alkey:

    Hello:

    Please refer to attached sheet.
    Let me explain you what i am after.

    In cell C3:C8 i have code for Sub Group of an item.

    Two left digit (Main Item):

    Code 12 is Cheeseburger
    Code 9 is Burger

    Two right digit(sub items):

    Code 10 is Kids Meal
    Code 14 is Basket Deal

    Now what i want know is to find how many of each caterogy as i have in listed in cell B17:B20.

    Let me Know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  17. #17
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hi Bebo:

    I have used your formula and works for 2 items and does not for other 2.
    Please have a look at attached sheet.
    Let me Know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  18. #18
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,651

    Re: Split up number

    Maybe:
    Please Login or Register  to view this content.
    Anyway, coding by numbers is not a good choice.

  19. #19
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Split up number

    mod(12.10,1) returns 0.099999999999999600000000000
    must be something to do with precision so try rounding
    =IF(MOD(A17,1),SUMPRODUCT((ROUND(MOD($C$3:$C$8,1),2)=A17)*($I$3:$I$8)),SUMPRODUCT((INT($C$3:$C$8)=A17)*($I$3:$I$8)))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  20. #20
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Split up number

    Maybe:

    =IF(SUMPRODUCT(--(LEFT($C$3:$C$8,2)=LEFT(A17,2)),--$I$3:$I$8)=0,SUMPRODUCT(--(RIGHT($C$3:$C$8,2)=RIGHT(A17,2)),--$I$3:$I$8),SUMPRODUCT(--(LEFT($C$3:$C$8,2)=LEFT(A17,2)),--($I$3:$I$8)))
    Attached Files Attached Files

  21. #21
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: Split up number

    Hello Guys:

    It looks like i will use bebo's formula and it seems to be working for me.
    I am very thankful to all for the help.
    Thanks

    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Split number into numbers!
    By sianjialin in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-19-2015, 01:39 AM
  2. Replies: 6
    Last Post: 11-26-2013, 05:21 PM
  3. split number and text
    By emina002 in forum Excel General
    Replies: 5
    Last Post: 07-02-2011, 07:22 PM
  4. Split number data
    By VBisgreat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-19-2011, 05:36 PM
  5. Split cell before number?
    By majahops in forum Excel General
    Replies: 2
    Last Post: 02-09-2008, 08:08 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1