+ Reply to Thread
Results 1 to 5 of 5

Complex IF Statement

  1. #1
    Forum Contributor
    Join Date
    07-08-2009
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003
    Posts
    142

    Complex IF Statement

    Hi All,

    I am trying to write an IF statement..
    condition is as below.

    I have four zones. East, North, West & South.
    If goods arrive in my store after a particular date, then I should be returned a value as "LATE FOR SALE"

    I need to put a condition. If the zone is ÉAST, & the goods arriving date is after 20th of May, I should be told as "Late for sale"
    for west - 22, May
    North - 25th May
    South - 28th may

    can you guys help me please ? Thanks
    Mani

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Complex IF Statement

    In the attached is one method of doing this. It uses a small lookup table to make it easy to adjust dates.

    BSB
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: Complex IF Statement

    If you don't care about the year (so any date from 1 Jan to 20 May with 'East' is 'on time', but any date from 21 May to 31 Dec with 'East' is 'late') then you can use multiple AND/OR checks like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    But if the year in the date matters (which it probably does!), then you would be best to put a list of zones and dates elsewhere on the sheet (or on another sheet), then refer to those in the formula. If you listed the zones in F2:F5 and dates in G2:G5, then this would work:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Here's a file showing both working: IF with Zone and Date _ for Shadmani.xlsx

    This is ok for just four zones/dates, but if you're going to have a lot of different zones and/or lots of different dates, then it would be better to use some sort of Lookup (VLOOKUP, INDEX/MATCH, etc) - if that's the case, let us know and we can give you a better solution.
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  4. #4
    Valued Forum Contributor
    Join Date
    12-28-2014
    Location
    NSW, Australia
    MS-Off Ver
    MS365
    Posts
    604

    Re: Complex IF Statement

    Not sure what you're looking for here, but maybe this will help.
    Attached Files Attached Files

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Complex IF Statement

    Your description is not specific so you're not going to get a specific answer.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    where

    zone is the cell containing the zone for this sale
    arrivaldate is the cell containing the arrival date for this sale
    latedatexxxx is the cell containing the late date for the corresponding zone
    Jeff
    | | |·| |·| |·| |·| | |:| | |·| |·|
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ 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. complex if statement
    By young_eeyore in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-11-2015, 07:37 PM
  2. Need Help with Complex If Statement (for me anyway)
    By Nelmagene in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2015, 05:54 PM
  3. [SOLVED] Complex if(or) statement help. Thanks!
    By jhwallace in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 08-04-2013, 12:21 PM
  4. [SOLVED] Complex IF AND OR statement
    By amack05 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2012, 11:09 AM
  5. Complex IF Statement
    By rhudgins in forum Excel General
    Replies: 1
    Last Post: 03-14-2011, 06:15 PM
  6. complex if statement
    By snoopy990 in forum Excel General
    Replies: 5
    Last Post: 06-02-2009, 01:21 PM
  7. Complex If Statement
    By robert_shindorf in forum Excel General
    Replies: 33
    Last Post: 12-12-2008, 09:08 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