Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Spreadsheets (https://www.askmehelpdesk.com/forumdisplay.php?f=395)
-   -   Find lowest after decimal... closest to whole number. (https://www.askmehelpdesk.com/showthread.php?t=795357)

  • Jun 27, 2014, 02:10 PM
    dannac
    Find lowest after decimal... closest to whole number.
    2.45
    3.75
    2.08
    4.06


    Need formula that would choose 4.06 from above list.
    Even though it is the largest number, the .06 is closest to the whole number.
  • Jun 27, 2014, 02:38 PM
    Wondergirl
    Why would you need a formula? It's obvious by just looking at the list.
  • Jun 27, 2014, 02:47 PM
    J_9
    The OP needs a formula to input into a spreadsheet.
  • Jun 27, 2014, 04:50 PM
    dannac
    Quote:

    Why would you need a formula? It's obvious by just looking at the list
    I would like to highlight it.
  • Jun 28, 2014, 04:00 PM
    dannac
    Got it with the use of helper columns.

    Used MOD function to separate the whole number.
    Used MIN function to find the lowest.
    Then conditional format to highlight.

    If someone has a solution without helper columns, I'm all ears.
  • Jun 30, 2014, 03:49 PM
    JBeaucaire
    Try this array formula:

    =INDEX(A1:A4,MATCH(ROUND(F1,2),ROUND(MOD(A1:A4,1), 2),0))

    ... confirmed by pressing CTRL+SHIFT+ENTER, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula.
  • Jun 30, 2014, 05:10 PM
    JBeaucaire
    My bad, I had a helper cell in use while constructing that formula. The final Array formula should be:

    =INDEX(A1:A4,MATCH(ROUND(MIN(MOD(A1:A4, 1)),2),ROUND(MOD(A1:A4,1),2),0))
  • Jul 1, 2014, 08:46 AM
    dannac
    Thanks JB... that works great.

  • All times are GMT -7. The time now is 10:21 AM.