Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
fosterp
 
Posts: n/a
Default AND and IF Functions


Hi! Is there anyway to get the AND and IF functions to work correctly
in one formula. I know that you can't nest functions that don't give
you the same type of answer. Here's what I'm looking to do...

I have three columns (A and B and C). Columns A and B have either Yes
or No entered into them. Column C has a number entered in to it. What
I need to do is have Column C's number entered into a new column (column
D) if both Columns A and B are Yes's. Here's an example:

A B C D
Yes No $500 -
No Yes $200 -
Yes Yes $300 $300

The only way I've been able to figure out is by doing an AND function
in a new column and then doing the IF function into it's own column.
Basically, I'm just trying to combine the two. Can anyone help?
Thanks!


--
fosterp
------------------------------------------------------------------------
fosterp's Profile: http://www.excelforum.com/member.php...o&userid=16316
View this thread: http://www.excelforum.com/showthread...hreadid=277087

  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default


With any function call...

=(A1="Yes")*(B1="Yes")*C1

Using IF...

=IF(AND(A1="Yes",B1="Yes"),C1,0)

fosterp Wrote:
Hi! Is there anyway to get the AND and IF functions to work correctly
in one formula. I know that you can't nest functions that don't give
you the same type of answer. Here's what I'm looking to do...

I have three columns (A and B and C). Columns A and B have either Yes
or No entered into them. Column C has a number entered in to it. What
I need to do is have Column C's number entered into a new column (column
D) if both Columns A and B are Yes's. Here's an example:

A B C D
Yes No $500 -
No Yes $200 -
Yes Yes $300 $300

The only way I've been able to figure out is by doing an AND function
in a new column and then doing the IF function into it's own column.
Basically, I'm just trying to combine the two. Can anyone help?
Thanks!



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=277087

  #3   Report Post  
Frank Kabel
 
Posts: n/a
Default

Hi
in D1 enter
=IF(AND(A1="Yes",B1="Yes"),C1,0)

or as alternative
=(COUNTIF(A1:B1,"Yes")=2)*C1

--
Regards
Frank Kabel
Frankfurt, Germany

"fosterp" schrieb im Newsbeitrag
...

Hi! Is there anyway to get the AND and IF functions to work

correctly
in one formula. I know that you can't nest functions that don't give
you the same type of answer. Here's what I'm looking to do...

I have three columns (A and B and C). Columns A and B have either

Yes
or No entered into them. Column C has a number entered in to it.

What
I need to do is have Column C's number entered into a new column

(column
D) if both Columns A and B are Yes's. Here's an example:

A B C D
Yes No $500 -
No Yes $200 -
Yes Yes $300 $300

The only way I've been able to figure out is by doing an AND function
in a new column and then doing the IF function into it's own column.
Basically, I'm just trying to combine the two. Can anyone help?
Thanks!


--
fosterp
---------------------------------------------------------------------

---
fosterp's Profile:

http://www.excelforum.com/member.php...o&userid=16316
View this thread:

http://www.excelforum.com/showthread...hreadid=277087


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



All times are GMT +1. The time now is 02:46 AM.

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

About Us

"It's about Microsoft Excel"