Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt
 
Posts: n/a
Default 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   Report Post  
Biff
 
Posts: n/a
Default

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   Report Post  
Ragdyer
 
Posts: n/a
Default

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" wrote in 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?


  #4   Report Post  
Matt
 
Posts: n/a
Default

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" wrote in 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?



  #5   Report Post  
Ragdyer
 
Posts: n/a
Default

Appreciate the feed-back.
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Matt" wrote in message
...
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" wrote in 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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
IF Statement with Average Function results in #Value! Paul Excel Discussion (Misc queries) 5 December 28th 04 08:11 AM
7+ nested if statement? Turi Excel Worksheet Functions 3 December 20th 04 07:55 PM
Statement lintan Excel Worksheet Functions 1 December 2nd 04 11:31 PM
IF Statement difficulty susan hayes Excel Worksheet Functions 3 November 2nd 04 09:46 PM


All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"