Nested If Condition

Sathsaj

New Member
Joined
Sep 2, 2015
Messages
23
=IFERROR(IF(Q2=0;"Match";IF(OR(AND(K2="Mickey";ABS(Q2)<=2);AND(K2="Mouse";ABS(Q2)<=2));"In Tolerance";""));"")
=IF(AND(K2="Cartoon";ABS(Q2)<=5)

Could you please help me nest these two independent formula's. I tried for nearly one hour and I basically poor in if conditions.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
what result should
AND(K2="Cartoon";ABS(Q2)<=5)
give - so we know where to add that function
you have Q2=0 - and also Q2 <5 with the AND

BUT Q2 = 0 is also less than 5 , so even if K2 is "Cartoon" , because Q2 is zero - it will be true and then do the next part of the formula

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
what result should
AND(K2="Cartoon";ABS(Q2)<=5)
give - so we know where to add that function
you have Q2=0 - and also Q2 <5 with the AND

BUT Q2 = 0 is also less than 5 , so even if K2 is "Cartoon" , because Q2 is zero - it will be true and then do the next part of the formula

Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
=IFERROR(IF(Q2=0,"Match",IF(OR(AND(K2="Mickey",ABS(Q2)<=2%),AND(K2="Mouse",ABS(Q2)<=2%)),"In Tolerance","")),"")
=IF(AND(K2="Mini",ABS(Q2)<=5%),"In Tolerance","")
 

Attachments

  • Screenshot 2024-01-31 165031.png
    Screenshot 2024-01-31 165031.png
    17.9 KB · Views: 7
Upvote 0
no need to copy my entire post, although you have now posted an image , which i did say was not great
But no answer to my question - or am i missing something
 
Upvote 0
no need to copy my entire post, although you have now posted an image , which i did say was not great
But no answer to my question - or am i missing something
I tried to download the BB things, but it gave me an error static cannot download on protected mode
 
Upvote 0
I tried to download the BB things, but it gave me an error static cannot download on protected mode
ok, but answer to the question ?
and how about using a share like dropbox as posted
 
Upvote 0
@Sathsaj
I have removed the 'Mark as solution' checkmark from post #7 since it clearly is not the solution to the question posed in post #1. If one of the other posts answers your original question then feel free to mark that as the solution. Otherwise it is fine to have no post marked.
 
Upvote 0

Forum statistics

Threads
1,215,084
Messages
6,123,021
Members
449,092
Latest member
ikke

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