+ Reply to Thread
Results 1 to 2 of 2

If Statement with four conditions

  1. #1
    Registered User
    Join Date
    07-24-2022
    Location
    Warsaw, Poland
    MS-Off Ver
    Excel version 2108
    Posts
    1

    Question If Statement with four conditions

    Hello,

    I would like to make one formula for the 4 arguments below (1,2,3 actually work with the formula below)
    But argument 4 shows an empty result instead of MC = OOM.

    Could you please assist how to modify the formula?

    =IF(AND(MONTH(A2)=MONTH(A1),DAY(A2)<DAY(A1)),A2,IF(A1>A2,A1,""))

    11/9/2022 OOM (A1)
    11/10/2022 Cont (A2)
    MC (A3)

    Arguments:
    1) If OOM is next month or later than Cont; MC = OOM +
    2) If OOM is same month but day later than Cont.; MC = Cont +
    3) If OOM is earlier then Cont (cont is next month or later); MC = blank +
    4) If OOM is earlier then Cont.date (cont is same month); MC = OOM -


    Thank you in advance!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: If Statement with four conditions

    Welcome to the forum! Please take a moment to re-read forum rule #1 and then amend your thread title to something that better explains your problem. Changing your thread title is not optional, which means you must change it. Thanks!

    Use concise, accurate thread titles.
    Your post title should describe your problem, not your anticipated solution.
    Use terms appropriate to a Google search - poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice tell us nothing.
    Responding to a request to change your thread title by doing so is mandatory.

    To change a title go to your first post, click EDIT then Go Advanced and change your title.

    This is not an option. Because you are new to the forum, I have made the change today. Please read the forum rules you agreed to abide by when you joined.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. VBA If statement with two conditions
    By Keibri in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2018, 12:42 PM
  2. [SOLVED] Need help with if statement and 3 conditions
    By reddwarf in forum Excel General
    Replies: 3
    Last Post: 07-18-2017, 08:20 AM
  3. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  4. [SOLVED] various conditions that have to be met in an if statement
    By Manjula1 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-01-2012, 04:42 AM
  5. [SOLVED] If statement with conditions on some....
    By albertc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-14-2012, 06:01 AM
  6. Replies: 3
    Last Post: 06-26-2005, 10:05 PM

Tags for this Thread

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