Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 9 of 9

Thread: Need help with IF formula

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this

    =IF(AND(A1="YES",A2="YES"),0.5,IF(OR(A1="YES",A2="YES"),0.25,"Neither"))

    Tom

  3. #3
    MrExcel MVP Aladin Akyurek's Avatar
    Join Date
    Feb 2002
    Location
    The Hague, NL
    Posts
    84,034
    Post Thanks / Like
    Mentioned
    37 Post(s)
    Tagged
    7 Thread(s)

    Default


    =COUNTIF(A1:A2,"YES")*0.25

  4. #4
    New Member
    Join Date
    Apr 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #5
    New Member
    Join Date
    Apr 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #6
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Clever Aladin...

  7. #7
    New Member
    Join Date
    Apr 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #8
    Board Regular
    Join Date
    Feb 2002
    Posts
    390
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-29 23:20, TsTom wrote:
    Clever Aladin...
    Indeed!

  9. #9
    New Member
    Join Date
    Apr 2002
    Location
    KC, MO
    Posts
    18
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-29 23:11, Aladin Akyurek wrote:

    =COUNTIF(A1:A2,"YES")*0.25
    Nice.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •