Solved: Need help with an IF statement

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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.
 

cwwozniak

Chuck
Trusted Advisor
Spam Fighter
Joined
Nov 28, 2005
Messages
66,843
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%?
 

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
 
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
 

jimr381

Jim
Joined
Jul 20, 2007
Messages
4,193
=If(B2<0.80,"Failed","Passed") That formula should fit your needs if B2 is referencing the total points for that user
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top