If Statement color formatting

Conell8383

Board Regular
Joined
Jul 26, 2016
Messages
66
Hi all. I hope you are well. I am trying to work on an If statement and I hope you can help.
What I am trying to achieve is this

IF Cell O4 = "YES" and C4 <11 and F4 is between 0 and 1 and I4 is between 0 and 1, and L4 is between 0 and 1 then Sum C4, F4, I4

I have attached a picture of my issue below for better understanding. I thank you all for an assistance it is greatly appreciated.

VUXOaEP.png
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
I have attached a picture of my issue below for better understanding.
A picture is not a lot of use as we cannot copy the data to our worksheets to test solution.
See Attachments for good ways to provide sample data that can be copied.

In any case, try this for row 4, and copy down.

=IF(AND(O4="yes",MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"")
 
Upvote 0
Hi Peter_SSs Thank you for the help it is greatly appreciated. With =IF(AND(O4="yes",MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"") it does not seem to take into account that C4 can be <= to 11. Or have I missed something?

With getting better data up here, I understand that screen shots are not the best way option, Is Dropbox an option??

Again thank you and the community here for all the support that is offered. It really is helping people and their careers.
 
Upvote 0
Hi Peter_SSs Thank you for the help it is greatly appreciated. With =IF(AND(O4="yes",MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"") it does not seem to take into account that C4 can be <= to 11. Or have I missed something?
No, it was me who missed that.

=IF(AND(O4="yes",C4<11,MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"")


With getting better data up here, I understand that screen shots are not the best way option, Is Dropbox an option??
Screen shots are the best method, but they need to be ones that can be copied from. The link I gave you provides options for that.

Dropbox is an option but many of the experienced helpers here choose not to download such files or are actually prevented from doing so by workplace security settings. The other options will get you many more potential helpers.
 
Upvote 0
Hi Peter: Thank you again for the support I have downloaded the HTML Maker so hopefully this will make things easier. I have applied your formula but it does not seem to be working for me I have put =IF(AND(O4="yes",C4<11,MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"Green") into Cell R4 but even though C4 is 45 it still gives me "green" as an answer. 45 is greater than 11 so it should not be green.
I will now try my new HTML tool to give some understand and insight into my data.

Excel 2010
ABCDEFGHIJKLMNOPQR
2Data Delivery StatusData Validation- PersistenceData Validation - AGSFinal Report - StatusResult
3NamesMarket%Records outstanding for submission% Customers Stuck% TOV's Stuck%OutstandingReport Developed
4JennyCroatia45521yesGreen
5Slovenia4111noGreen
6Spain1811150Green
7Italy90150550Green
8CORE10025000Green
9MFM50000Green
10Covance60000Green
Summary
Cell Formulas
RangeFormula
C6=Jenny!F12
F6=Jenny!H12
I6=Jenny!I12
L6=Jenny!M12
O5=Jenny!O11
O6=Jenny!O12
R4=IF(AND(O4="yes",C4<11,MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"Green")
R5=IF(AND(O5="yes",C5<11,MIN(F5,I5,L5)>=0,MAX(F5,I5,L5)<=1),C5+F5+I5,"Green")
R6=IF(AND(O6="yes",C6<11,MIN(F6,I6,L6)>=0,MAX(F6,I6,L6)<=1),C6+F6+I6,"Green")
 
Upvote 0
Hi Peter: Thank you again for the support I have downloaded the HTML Maker so hopefully this will make things easier. I have applied your formula but it does not seem to be working for me I have put =IF(AND(O4="yes",C4<11,MIN(F4,I4,L4)>=0,MAX(F4,I4,L4)<=1),C4+F4+I4,"Green") into Cell R4 but even though C4 is 45 it still gives me "green" as an answer. 45 is greater than 11 so it should not be green.
Firstly, my formula had nothing about 'Green', that is something that you added.

In any case, your first post stated:
IF Cell O4 = "YES" and C4 <11 and F4 is between 0 and 1 and I4 is between 0 and 1, and L4 is between 0 and 1 then Sum C4, F4, I4
That is, if all of the blue conditions are met then return the red result. You did not say what result you wanted if any of the blue conditions failed. In the absence of any instructions, my formula said to return an empty string "" if any of the blue conditions failed. You have changed that to "Green". In row 4 of your sample, three of the blue conditions are false (C4 is not less than 11, F4 is not between 0 and 1, I4 is not between 0 and 1) and so "Green" is returned. What result did you expect for row 4 and why?

(The screen shot is good though as it can be copied/pasted for testing :))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,844
Messages
6,127,255
Members
449,372
Latest member
charlottedv

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