+ Reply to Thread
Results 1 to 5 of 5

If statement with two requirements

  1. #1
    Matt
    Guest

    If statement with two requirements

    I am trying to write an IF statement with two requirements. I have a date
    column and a text column. I would like the formula to give an end result of
    "1" if the date cell is greater than a certain month AND if my text cell
    equals a certain word. Can this be done?

  2. #2
    Biff
    Guest

    If statement with two requirements

    Hi!

    You haven't defined what you want if those conditions are
    false.

    These will return 1 if true and 0 if false:

    =(MONTH(A1)>5)*(B1="word")

    =--AND(MONTH(A1)>5,B1="word")

    This one will leave the cell blank (not empty) if false:

    =IF(AND(MONTH(A1)>5,B1="word"),1,"")

    Biff

    >-----Original Message-----
    >I am trying to write an IF statement with two

    requirements. I have a date
    >column and a text column. I would like the formula to

    give an end result of
    >"1" if the date cell is greater than a certain month AND

    if my text cell
    >equals a certain word. Can this be done?
    >.
    >


  3. #3
    Ragdyer
    Guest

    Re: If statement with two requirements

    One way.
    Date column is A, and text column is B,
    And with your criteria date in D1, and your criteria text in E1, try this:

    =--AND(MONTH(A1)>MONTH($D$1),B1=$E$1)
    And drag down to copy as needed.

    This returns ones and zeroes.

    If you'd rather have ones and *empty* cells, try this:

    =IF(AND(MONTH(A1)>MONTH($D$1),B1=$E$1),1,"")

    --
    HTH,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------

    "Matt" <[email protected]> wrote in message
    news:[email protected]...
    > I am trying to write an IF statement with two requirements. I have a date
    > column and a text column. I would like the formula to give an end result

    of
    > "1" if the date cell is greater than a certain month AND if my text cell
    > equals a certain word. Can this be done?



  4. #4
    Matt
    Guest

    Re: If statement with two requirements

    THANK YOU VERY MUCH!!!!!!! That was almost two hours of me ramming my head
    in the wall because I couldn't figure it out. I kept trying to use
    @IF(and(..... statements, but either they wouldn't work, or they worked a
    different way so I kept thinking it was something that I didn't add.
    Anyways. Thanks again for helping me with this!!

    "Ragdyer" wrote:

    > One way.
    > Date column is A, and text column is B,
    > And with your criteria date in D1, and your criteria text in E1, try this:
    >
    > =--AND(MONTH(A1)>MONTH($D$1),B1=$E$1)
    > And drag down to copy as needed.
    >
    > This returns ones and zeroes.
    >
    > If you'd rather have ones and *empty* cells, try this:
    >
    > =IF(AND(MONTH(A1)>MONTH($D$1),B1=$E$1),1,"")
    >
    > --
    > HTH,
    >
    > RD
    >
    > ---------------------------------------------------------------------------
    > Please keep all correspondence within the NewsGroup, so all may benefit !
    > ---------------------------------------------------------------------------
    >
    > "Matt" <[email protected]> wrote in message
    > news:[email protected]...
    > > I am trying to write an IF statement with two requirements. I have a date
    > > column and a text column. I would like the formula to give an end result

    > of
    > > "1" if the date cell is greater than a certain month AND if my text cell
    > > equals a certain word. Can this be done?

    >
    >


  5. #5
    Ragdyer
    Guest

    Re: If statement with two requirements

    Appreciate the feed-back.
    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "Matt" <[email protected]> wrote in message
    news:[email protected]...
    > THANK YOU VERY MUCH!!!!!!! That was almost two hours of me ramming my

    head
    > in the wall because I couldn't figure it out. I kept trying to use
    > @IF(and(..... statements, but either they wouldn't work, or they worked a
    > different way so I kept thinking it was something that I didn't add.
    > Anyways. Thanks again for helping me with this!!
    >
    > "Ragdyer" wrote:
    >
    > > One way.
    > > Date column is A, and text column is B,
    > > And with your criteria date in D1, and your criteria text in E1, try

    this:
    > >
    > > =--AND(MONTH(A1)>MONTH($D$1),B1=$E$1)
    > > And drag down to copy as needed.
    > >
    > > This returns ones and zeroes.
    > >
    > > If you'd rather have ones and *empty* cells, try this:
    > >
    > > =IF(AND(MONTH(A1)>MONTH($D$1),B1=$E$1),1,"")
    > >
    > > --
    > > HTH,
    > >
    > > RD
    > >

    >
    > --------------------------------------------------------------------------

    -
    > > Please keep all correspondence within the NewsGroup, so all may benefit

    !
    >
    > --------------------------------------------------------------------------

    -
    > >
    > > "Matt" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I am trying to write an IF statement with two requirements. I have a

    date
    > > > column and a text column. I would like the formula to give an end

    result
    > > of
    > > > "1" if the date cell is greater than a certain month AND if my text

    cell
    > > > equals a certain word. Can this be done?

    > >
    > >



+ 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