How do I return this value

Carla carla

New Member
Joined
Oct 29, 2022
Messages
47
Office Version
  1. 365
Platform
  1. Windows
Hello how should I put this formula.
I want to compare two test.
So the conditions are:

test 1 <=5& test2 <=5 ====Expected
test1<test 2 ===below
test 1>=6&test 2>=6=== above

Thank you

TEST 1TEST 2RETURN VALUE
54Below
55Expected
66Above
77Above
88Above
99Above
44Expected
34Above
33Expected
43Below
24Above
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
try
1695275200318.png
 
Upvote 0
I am not sure your original expectations are accurate. Why do you have "Below" as the expected value in the first record.
And I'm not sure you're taking into consideration all possible scenarios. Try this:

Mr excel questions 63.xlsm
ABCD
1
2TEST 1TEST 2RETURN VALUE
354BelowExpected
455ExpectedExpected
566AboveAbove
677AboveAbove
788AboveAbove
899AboveAbove
944ExpectedExpected
1034AboveExpected
1133ExpectedExpected
1243BelowExpected
1312Expected
1421Expected
1566Above
1644Expected
1756Other
1865Other
Carla carla
Cell Formulas
RangeFormula
D3:D18D3=IF(AND(A3<=5,B3<=5),"Expected",IF(A3<A3,"Below",IF(AND(A3>=6,B3>=6),"Above","Other")))
 
Upvote 0
I am not sure your original expectations are accurate. Why do you have "Below" as the expected value in the first record.
And I'm not sure you're taking into consideration all possible scenarios. Try this:

Mr excel questions 63.xlsm
ABCD
1
2TEST 1TEST 2RETURN VALUE
354BelowExpected
455ExpectedExpected
566AboveAbove
677AboveAbove
788AboveAbove
899AboveAbove
944ExpectedExpected
1034AboveExpected
1133ExpectedExpected
1243BelowExpected
1312Expected
1421Expected
1566Above
1644Expected
1756Other
1865Other
Carla carla
Cell Formulas
RangeFormula
D3:D18D3=IF(AND(A3<=5,B3<=5),"Expected",IF(A3<A3,"Below",IF(AND(A3>=6,B3>=6),"Above","Other")))
TTest B should be higher than TEst 1
 
Upvote 0
TTest B should be higher than TEst 1
i'm not sure which of my questions/comments this is referring to?
Is your original column C your expectations or is it what your original calculation came up with?
Or are you saying Test2 (i am assuming B and 2 are the same) is always greater than Test 1 because of your environment/data circumstances?
Are the additional scenarios I added possible?

Do you have any priority of the tests other than what you have listed?
 
Upvote 0
@Rick Rothstein I see how your formula works. You somewhat re-wrote the requirement with the a=b condition.
And I had a typo in my first condition, but I still have differences.

But I still question Row 1. Why does Row 1 have values of 5 & 4 and @Carla carla expects that to result in "Below" when the test for Below is test1<test 2 ===below.
(Your formula figures that out, but I don't see how the progression of conditions in the requirements matches your formula).
 
Upvote 0
The way I deciphered the OP's instructions coupled with the posted example photos, if the two values are equal and equal to or less than 5, the "Expected", if the two values are equal and above 5, then "Above", otherwise you compare the second value to the first value to the first value and return "Above" or "Below".
 
Upvote 0
The way I deciphered the OP's instructions coupled with the posted example photos, if the two values are equal and equal to or less than 5, the "Expected", if the two values are equal and above 5, then "Above", otherwise you compare the second value to the first value to the first value and return "Above" or "Below".
Yes, you did an extra step of analysis! I read the requirement verbatim and saw that they didn't fit and asked. You figured something out. And although I would not say the requirement is ambiguous it is confusing.
 
Upvote 0

Forum statistics

Threads
1,215,390
Messages
6,124,667
Members
449,178
Latest member
Emilou

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top