![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi Listers,
I'm trying to do the following and can't seem to get the correct formula. If either Cell A1 or Cell A2 equals YES put .25 in Cell A3. If both A1 & A2 equal YES put .50 in A3. I've tried doing an IF function, as well as trying to do an If-Then-ElseIf function, but I'm not very experienced in Excel and function/formulas. Can anyone help? Thanx, in advance. Laura Meeks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Try this
=IF(AND(A1="YES",A2="YES"),0.5,IF(OR(A1="YES",A2="YES"),0.25,"Neither")) Tom |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
=COUNTIF(A1:A2,"YES")*0.25 |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi Tom,
Thanx for your suggestion. It didn't work quite right (using the formula you gave me, when both A1 and A2 equaled YES, I came up with the answer Neither, rather than .50), but I'm going to try tweaking it to see if I can get it. Thanx, again. I really appreciate your assistance. Laura |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Tom,
I apologize...you're formula DID work, it was *me* who blew it! I used the wrong cell references. (No wonder it didn't wanna work!) Many thanx!! Laura |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Clever Aladin...
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Hi Aladin Akyurek,
I want to thank you for your response. Your formula also worked! You guys are great!! I'm going to go look closely at each so that I can figure out what I was doing wrong and why your and Tom's formulas work. Thanx, again, I appreciate your help. Laura |
|
|
|
|
|
#8 | |
|
Board Regular
Join Date: Feb 2002
Posts: 390
|
Quote:
|
|
|
|
|
|
|
#9 | |
|
New Member
Join Date: Apr 2002
Location: KC, MO
Posts: 18
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|