+ Reply to Thread
Results 1 to 5 of 5

Function to separate numbers w.r.t no. of digits after decimal point

  1. #1
    Registered User
    Join Date
    08-25-2015
    Location
    Chennai,India
    MS-Off Ver
    2010
    Posts
    2

    Function to separate numbers w.r.t no. of digits after decimal point

    Hello Everyone,

    Is there a function to segregate (or separate) the numbers w.r.t number of digits after the decimal places?

    For ex. lets assume a set of data with 6 data points :
    1. 104.1
    2. 232.30
    3. 101.32
    4. 19.1
    5. 1.1
    6. 200.34

    I need a function which will separate the data points with 1 digit after the decimal point as Group A (S.no. 1,4,5 as Group A) and 2 digits after the decimal point as Group B (S.No. 2,3 as Group B)...

    Thanks.
    Bala

  2. #2
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: Function to separate numbers w.r.t no. of digits after decimal point

    Hello and gm

    Can I get a bit clarification on what you mean by S.no. 1,4,5 as you are crystal clear with that you want if the data points with 1 digit after the decimal point as Group A and with 2 digits after the decimal point as Group B.

    Regards
    Jaya

  3. #3
    Registered User
    Join Date
    08-25-2015
    Location
    Chennai,India
    MS-Off Ver
    2010
    Posts
    2

    Re: Function to separate numbers w.r.t no. of digits after decimal point

    Excel 1.pngHello Jaya,

    Thanks for the reply.

    I would like to segregate the data range - with 1 digit after the decimal point as one group, with 2 digits after the decimal point as another group, and so on..

    Hope you got what I meant here..Refer the image..

    Thanks
    Bala

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Function to separate numbers w.r.t no. of digits after decimal point

    there are lots of ways to do this. here's one:
    =IFERROR(INDEX($A$1:$A$6,SMALL(IF(LEN($A$1:$A$6)-FIND(".",$A$1:$A$6)=1,ROW($A$1:$A$6)),ROWS($1:1))),"")

    entered as an array. To retrun those with 2 dp, change the 1 here: ...$A$6)=1,ROW($A... to a 2

    Array Formulae are a little different from ordinary formulas in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly braces { } appear around the outside of your formula. If you do not CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly braces yourself - it won't work...
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Function to separate numbers w.r.t no. of digits after decimal point

    ... or a single formula (array entered), dragged across and down as far as needed

    =IFERROR(INDEX($A$1:$A$6,SMALL(IF(LEN($A$1:$A$6)-FIND(".",$A$1:$A$6)=COLUMNS($A:A),ROW($A$1:$A$6)),ROWS($1:1))),"")
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 08-26-2015 at 02:16 AM. Reason: Added attachment

+ 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] Last 2 digits to treat as the decimal point
    By lemuel in forum Excel General
    Replies: 4
    Last Post: 03-26-2012, 10:59 AM
  2. How to separate numbers after decimal point
    By Ozwilly in forum Excel General
    Replies: 3
    Last Post: 10-02-2011, 09:25 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