+ Reply to Thread
Results 1 to 9 of 9

IF Does Not Seem to Understand

  1. #1
    Registered User
    Join Date
    08-20-2011
    Location
    Gourock, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    25

    IF Does Not Seem to Understand

    Hi Everyone,

    I have a formula (or at least I'm trying to create one) which should compare a Cell value of Time (H:mm) (Cell C3) with that of other Cells of the same format.

    The attached example will show that both formulas are returning a value, but if the time in the Source Cell is changed to a higher or lower time, this is not being reflected in the output cell. i.e. The value does not change.

    My intention is to have only one formula which checks against all time values in the "Begin - End - Class" array for each and every entry in rows 3-16.

    The values currently showing in Column E (Time-zone) have been entered manually as a check against that which the formula should return.
    Column G is registering a value of 1 (but should be 2).

    All/any help would be gratefully received as to why this formula is not working as required.

    Thank you,

    Ian
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444

    Re: IF Does Not Seem to Understand

    Hi,

    Does this help at all?

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: IF Does Not Seem to Understand

    This formula will give you the appropriate Class codes:

    =IFERROR(MATCH(C3,$A$20:$A$25),"")

    Put it on row 3, then copy down as required.

    Hope this helps.

    Pete

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: IF Does Not Seem to Understand

    Ian

    In column E for 12:39 why should the time zone be 3?

    Shouldn't it be 4, i.e. between 12:00 and 16:00?

    PS Does this formula work?

    =LOOKUP(C3,{0;0.166666666666667;0.333333333333333;0.5;0.666666666666667;0.833333333333333},{1;2;3;4;5;6})
    If posting code please use code tags, see here.

  5. #5
    Registered User
    Join Date
    08-20-2011
    Location
    Gourock, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: IF Does Not Seem to Understand

    Hi sweep,

    What can I say -- but Thank You.
    It not only works but, despite never having previously used "Index or Match" -- I can almost understand it !!!

    Kind regards,

    Ian

  6. #6
    Registered User
    Join Date
    08-20-2011
    Location
    Gourock, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: IF Does Not Seem to Understand

    Hi Pete UK,

    As with the reply from "sweep" --- Brilliant!!

    I'm not only surrounded by geniuses, I am now spoilt for choice on formulas.

    Many thanks,

    Ian

  7. #7
    Registered User
    Join Date
    08-20-2011
    Location
    Gourock, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: IF Does Not Seem to Understand

    Hi Norie,

    Column E, where it shows 3 and not 4 as the TimeZone, is a clear illustration of my need for a formula as a formula is considerably more accurate than I. (In other words -- it was a mistake on my part -- well spotted.)

    Thanks too for your formula response.

    It certainly works but, I have to admit, I don't understand it -- but I shall investigate the mysteries of "LOOKUP" and learn.

    Many thanks for your help.

    Best regards,

    Ian

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,728

    Re: IF Does Not Seem to Understand

    Glad to help, Ian - thanks for the rep.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

  9. #9
    Registered User
    Join Date
    08-20-2011
    Location
    Gourock, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: IF Does Not Seem to Understand

    Hi Pete_UK,

    Sorry for the omission but yes, my question is well and truly solved.

    Ian

+ 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. can't understand code
    By superchew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2015, 08:03 PM
  2. Help me understand column
    By anmol786 in forum Excel General
    Replies: 1
    Last Post: 10-06-2014, 09:38 AM
  3. I don't understand IF!
    By Yidoboy in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-23-2014, 05:11 AM
  4. Replies: 1
    Last Post: 09-18-2007, 02:07 PM
  5. Don't understand the off-set
    By DaGo21 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-04-2006, 12:15 AM
  6. I just don't understand it!
    By datingservices2 in forum Excel General
    Replies: 3
    Last Post: 08-14-2006, 11:20 AM
  7. I don't Understand
    By elusiverunner in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 11-25-2005, 05:20 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