syntax for adding up different cols

cmeredith1973

New Member
Joined
Apr 8, 2019
Messages
33
Office Version
  1. 365
Platform
  1. Windows
Hi - I am trying to have an if(or(and syntax) and am trying to solve this true or false statement. I wanted to ask for the forum for some help, thank you in advance.

I have 2 col's, B6 which either equals 0, 1 or more than 1.
Col J, is has values going from 0-100% or more.

=(IF(B6=1,SUM(J:J),IF(AND(B6>1,SUM(J:J>95%)),"total over qty",SUM(J:J))))

I wanted to ask how I can get the syntax to flow. It works but never equals the true statement of "total over qty", it always sums the final j col.

What I am trying to is measure a table of products. when theres 1 in b6, i just want it to sum col J. when its more than 1, i want to to say "full" when col J is 95% or higher. When its less than 95%, i want it to sum col J.
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
I am not sure I fully understand but will try to help.

From what I interpret from your question your formula appears to work as intended.

I created a sheet and in Column B I entered either 0, 1 or 3
I also populated column J with the values in the range of 0-100%

I then inserted your formula into column K.

Column BColumn JColumn K (Formula) =(IF(B1=1,SUM(J:J),IF(AND(B1>1,SUM(J:J>95%)),"total over qty",SUM(J:J))))
00%422
195%422
397%total over qty
380%422
075%422
175%422

Based on this when the value of column B is over 1 (Not = 1 but > 1) AND column J is over 95 then it will show the text "total over qty"
Otherwise it will sum the entire column J which in this example is 422(0 + 95 + 97+ 80 + 75 + 75)

If you can clarify what is not working specifically I may be able to assist.

What I am trying to is measure a table of products. when theres 1 in b6, i just want it to sum col J. when its more than 1, i want to to say "full" when col J is 95% or higher. When its less than 95%, i want it to sum col J.

Based on what you posted this is doing just that, when column B = 1 it sums all of column J, when its greater than one AND column J is 95% or greater it returns "total over qty", when B is greater than 1 and Column J is less than 95% it returns the sum of column J

I did notice that it did not work properly until I had actually formatted column J as %
 
Upvote 0
Solution
Hey thank you - the suggestion of the format helped. I was able to solve this way with 2 cheater sum up col's.

o1= sum J;J b6 = sum b7;b10

=IF(B6=1,O1,IF(AND(B6<>1,O1>95%),"Truck Full",O1))
 
Upvote 0

Forum statistics

Threads
1,215,051
Messages
6,122,871
Members
449,097
Latest member
dbomb1414

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