+ Reply to Thread
Results 1 to 3 of 3

Nested IF/OR formula or vba code instead?

  1. #1
    Registered User
    Join Date
    03-26-2009
    Location
    Huddersfield, England
    MS-Off Ver
    o365
    Posts
    19

    Nested IF/OR formula or vba code instead?

    Hello and thanks for reading :-)
    I have a spreadsheet which contains dates (amongst other info) of when a specific form was completed for a client. We have 'date windows' which these should fall into. I'm really struggling with how to work this one out and whether to use nested IF's or try some kind of code (although my vb knowledge kind of stops after recording a macro lol)
    Bascially I need to know for each 'date window' if the window has been met or missed. There may be up to 30 different dates per person (in my example sheet I have up to 9) and I was wondering if anyone can give me pointers on how to do this without it taking forever!
    Thanks
    Rachael
    Attached Files Attached Files
    Last edited by rachbendy; 04-02-2009 at 04:57 AM.

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

    Re: Nested IF/OR formula or vba code instead?

    You can shorten that formula in C2 by replacing it with

    =IF(ABS(B2-A2)>14,A2,B2)

    Try using VLOOKUP. In another part of the sheet (or on a separate sheet) enter this as a vertical table, I've chosen C14:D20

    Please Login or Register  to view this content.
    Then this formula

    =VLOOKUP(INT((D2-C2)/7),C14:D20,2,TRUE)

    will provide you with the window the date sits in

    Also in your formulae in row 2 you dont have "Missed Window 1" anywhere
    Last edited by Special-K; 04-01-2009 at 01:22 PM.
    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
    Registered User
    Join Date
    03-26-2009
    Location
    Huddersfield, England
    MS-Off Ver
    o365
    Posts
    19

    Re: Nested IF/OR formula or vba code instead?

    Thanks Special-K, that helps a lot!!
    Rachael

+ 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