Need Help With A Big Formula

ULFireTester

New Member
Joined
Oct 22, 2020
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, I've got a formula that I'm needing help on.

Here's what I want the end result to be:
  • If both G142 & H142 are blank, return “N/A” on V142
  • If G142 is blank & N142 is ??, then return “Test Failed” on V142
  • If G142 is blank & N142 is <= 250, return “Test Passed” on V142
  • If both G142 & N142 are not blank, then calculate the absolute difference between them and if that is <= 30, return “Test Passed” on V142 but if the absolute difference between them is greater than 30, return “Test Failed” on V142.
I'm not even sure if those 4 bullet points are in the correct order or not.

Thank you very much in advance,
Chris B
 

Attachments

  • Excel Screen Shot.jpg
    Excel Screen Shot.jpg
    44.7 KB · Views: 10

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi

This formula should work for your requests:

Excel Formula:
=IF(AND($G$142="";$H$142="");"N/A";IF($G$142="";IF($H$142<=250;"Test Passed";"Test Failed");IF(AND($G$142<>"";$H$142<>"");IF(ABS($G$142-$H$142)<=30;"Test Passed";"Test Failed");"H142 Blank")))

The only thing missing was what you want to happen when H142 is blank but G142 is not. Now I entered "H142 Blank", but feel free to adjust this if needed.
 
Upvote 0
Assuming H142 should have been N142, maybe
Excel Formula:
=IF(AND(G142="",N142=""),"N/A",IF(G142="",IF(N142<=250,"Test passed","Test failed"),IF(N142<>"",IF(ABS(G142-N142)<=30,"Test passed","Test failed"),"Test failed")))
 
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,588
Members
449,039
Latest member
Arbind kumar

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