1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Need help with an IF statement

Discussion in 'Business Applications' started by pmdelgado1, Jan 17, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. pmdelgado1

    pmdelgado1 Thread Starter

    Joined:
    Jan 17, 2011
    Messages:
    3
    Hi,
    I've run into some issues that no matter how much I research I cannot come up with a solution:confused:

    I need to be able to get an IF formula that will allow me to get a "Passed" or "Failed" answer. This is what I'm doing:

    While doing a quality assurance, the agents are measure based on different criteria each section gives the agent up to 10 + or - points for a total of 100%. Now if the agents reach 80% or more they have passed the QA check, anything less than 79% is a failed.

    My formula only gives me a "Passed", and the default False.

    Is there a formula that will give me a Passed if the agent reached 80%or more and a Failed if is less than 79%.
    Thank you for your help.
     
  2. cwwozniak

    cwwozniak Trusted Advisor Spam Fighter

    Joined:
    Nov 28, 2005
    Messages:
    62,940
    First Name:
    Chuck
    Hi and welcome to TSG,

    It might help us to help you if you told us exactly what software you using.

    It might also help us to troubleshoot your formula if we knew what it is.

    EDIT: What should happen if the score is exactly equal to 79%?
     
  3. pmdelgado1

    pmdelgado1 Thread Starter

    Joined:
    Jan 17, 2011
    Messages:
    3
    Thank you cwwozniak
    I am using Winxp, with excel 2007
    What should happen if the score is exactly equal to 79%? --> it should read "Failed".
    thank you
     
  4. gyclone

    gyclone

    Joined:
    Jan 16, 2011
    Messages:
    119
    Code:
    Sub get_pass_fail()
    
    
    Dim result As String
    Dim score As Double
    
    Dim CompareRange As Variant, cl As Variant
        Set CompareRange = ActiveWorkbook.Sheets("Sheet3").Range("a8:a15") ' Adjust range to suit your needs
    
        For Each cl In CompareRange
    
            score = CDec(cl.Value) / 10
            If score <= 0.79 Then
                result = "Fail"
            Else: result = "Pass"
            End If
            
            ' Insert result into the next cell to the right
            Range(cl.Address).Offset(0, 1).Value = result
        Next cl
    End Sub
    
    
     
  5. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    =If(B2<0.80,"Failed","Passed") That formula should fit your needs if B2 is referencing the total points for that user
     
  6. pmdelgado1

    pmdelgado1 Thread Starter

    Joined:
    Jan 17, 2011
    Messages:
    3
    Thank you very much for your support, both formulas worked GREAT!
     
  7. jimr381

    jimr381

    Joined:
    Jul 20, 2007
    Messages:
    4,189
    First Name:
    Jim
    Good to hear. Let us know if you need anything else.
     
  8. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/975287

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice