+ Reply to Thread
Results 1 to 10 of 10

How to separate/filter out number with 3 decimal places into another column?

  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    How to separate/filter out number with 3 decimal places into another column?

    Please help,

    currently i'm working on a massive number of data (up to 50 000++). i need to separate or filter out the numbers which have only 3 decimal places into a new column (highlighted in the attached image). is there any specific formula or advanced filter option in order to succeed this task ? Untitled.jpg

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: How to separate/filter out number with 3 decimal places into another column?

    Try using a Helper column with

    =IF(LEN(E1)=5,E1,"")
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    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: How to separate/filter out number with 3 decimal places into another column?

    Formula suggested above will do what you want. However, it will leave blank rows between the extracted numbers. You may also look at an array formula that will extract 3 decimal numbers without leaving blank rows.

    =IFERROR(INDEX(A:A,SMALL(IF(LEN($A$1:$A$6)=5,ROW($A$1:$A$6)),ROWS(B$1:B1))),"")

    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

    Row\Col
    A
    B
    1
    0.256
    0.256
    2
    0.254
    0.254
    3
    0.0005456
    0.356
    4
    0.1234
    5
    0.2456
    6
    0.356
    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

  4. #4
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    Re: How to separate/filter out number with 3 decimal places into another column?

    reply to @AlKey

    I have tried using the array formula as u stated above :

    =IFERROR(INDEX(P:P,SMALL(IF(LEN(P7:P22)=5,ROW(P7:P22)),ROWS(S7))),"")

    However, the output shown isnt the same as yours (as shown in attached figure) , where the output data does not filter out the unwanted value:

    1 - all numbers which have more than 3 decimal places
    2 - numbers which have "0" at the 3rd decimal places ex: 0.510

    PROBS 1.jpg
    Last edited by raimy haidar; 02-11-2015 at 03:02 AM.

  5. #5
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    Re: How to separate/filter out number with 3 decimal places into another column?

    reply to @AlKey

    I have tried using the array formula as u stated above :

    =IFERROR(INDEX(P:P,SMALL(IF(LEN(P7:P22)=5,ROW(P7:P22)),ROWS(S7))),"")

    However, the output shown isnt the same as yours (as shown in attached figure) , where the output data does not filter out the unwanted value:

    1 - all numbers which have more than 3 decimal places
    2 - numbers which have "0" at the 3rd decimal places ex: 0.510 Attachment 376542

  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: How to separate/filter out number with 3 decimal places into another column?

    It didn't work because of changes you made. Here is what if should've been:

    =IFERROR(INDEX(P:P,SMALL(IF(LEN(P$7:P$22)=5,ROW(P$7:P$22)),ROWS(S$7:S7))),"")

    ***Array formula must be entered by using key combination of CTRL+SHIFT+ENTER and not just ENTER

  7. #7
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    Re: How to separate/filter out number with 3 decimal places into another column?

    that works great sir!

    however, there is an issue where it cannot be filtered out the value with "zero" digit (example 0.510, 0.010 "as shown in the attached figure), from my understanding, it detect these values as 2 decimal places. is there any solution for this ?

    PROBS2.jpg

  8. #8
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    Re: How to separate/filter out number with 3 decimal places into another column?

    and isit possible to filter out together both column A and B (means 0.508 and 0.000147656 is filtered out together )

  9. #9
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: How to separate/filter out number with 3 decimal places into another column?

    The trailing 0 is only visible due to formatting. If you don't have values that are only two decimal places that you don't want included you could make a minor change to the formula given to extract the values that end in 0. Change the =5 part to <=5 then use formatting to show 3 decimal places.

    This ARRAY formula will bring in the neighbouring values for the formula given by AlKey.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  10. #10
    Registered User
    Join Date
    02-10-2015
    Location
    MALAYSIA
    MS-Off Ver
    2013
    Posts
    13

    Re: How to separate/filter out number with 3 decimal places into another column?

    that works great sir ! thanks you =)

+ 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. Adusting decimal places based on greatest number of places in a series
    By anelson87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-11-2022, 01:05 PM
  2. [SOLVED] copy number with 3 or more decimal places and paste the actual value as 2 decimal number
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-29-2013, 12:57 AM
  3. Vba to format number of decimal places dependant on number in another cell
    By wonderdunder in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2012, 09:33 AM
  4. number of decimal places
    By Geordie in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-22-2010, 03:06 AM
  5. Paste two decimal number in excel without extra decimal places appearing
    By jeffery_frick in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2009, 07:49 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