+ Reply to Thread
Results 1 to 4 of 4

If function help please

  1. #1
    Registered User
    Join Date
    12-12-2012
    Location
    Essex
    MS-Off Ver
    Excel 2003
    Posts
    7

    If function help please

    I have 3 columns with times displayed in each and need to determine the closest in time to that in cell A1

    Example

    A1 B1 C1
    08:35:47 17:05:45 08:36:27
    11:14:47 11:15:06 09:03:18
    15:56:26 15:56:41 14:55:10

    Thanks

    Dcumby

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: If function help please

    It's always a value above the value in A1?

    If so, you can use this one.

    Please Login or Register  to view this content.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    12-12-2012
    Location
    Essex
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: If function help please

    Yeah will always be above the value in A1.

    I need it to return the nearest in time in the same line only:

    So:

    08:35:47 17:05:45 08:36:27

    I need it to return or highlight, show me in some way which is nearest in time to that in cell A1. I have 17000 lines like this I need to determine.

    Any help will be appreciated as you can tell.

    Thanks

  4. #4
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If function help please

    hi Dcumby, welcome to the forum. assuming your data starts from A1, select the range you want to apply to (maybe B1:C17000)
    in Excel 2007 & above, go to Home -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format -> Format values where this formula is true:
    in Excel 2003, go to Format -> Conditional Formatting -> Formula is:
    =$A1+MIN(ABS($A1-$B1),ABS($A1-$C1))=B1

    format to the colour you desire

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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