Why Does this sum formula not work properly?

keef2

Board Regular
Joined
Jun 30, 2022
Messages
185
Office Version
  1. 365
Platform
  1. Windows
Just like the title says in Row 1 i have a simple sum formula that works in some cases but in others it doesnt sum the numbers. The following snip shows 9 when the sum should be 40?

Cell Formulas
RangeFormula
JH1:JL1JH1=SUM(JH4:JH27)
JH2JH2=CHOOSE(MONTH(JJ3),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
JH3:JL3JH3=WORKDAY(JG3,1)
JH4:JL4JH4=IF($G4="","",IF(AND(JH$3>=$F4,NOT(COUNTIFS(Holidays!$F$3:$F$34,JH$3)),JH$3<=$G4),8,""))
JH5:JL27JH5=IF($G5="","",IF(AND(JH$3>=$F5,NOT(COUNTIFS(Holidays!$F$3:$F$34,JH$3)),JH$3<=$G5-1),8,""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M3:JQ27,JQ4:NR27,M5:NR27Expression=COUNTIFS(Holidays!$F$3:$F$34,M$3)textNO
4:50Expression=AND(NOT(ISBLANK($B4)),ISBLANK($A4))textNO
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Worth noting is this formula seems to work if in the bottom row? However, i want it in row 1.

Cell Formulas
RangeFormula
JH1:JQ1JH1=SUM(JH4:JH27)
JH2,JM2JH2=CHOOSE(MONTH(JJ3),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
JH3:JQ3JH3=WORKDAY(JG3,1)
JH4:JQ4JH4=IF($G4="","",IF(AND(JH$3>=$F4,NOT(COUNTIFS(Holidays!$F$3:$F$34,JH$3)),JH$3<=$G4),8,""))
JH5:JQ27JH5=IF($G5="","",IF(AND(JH$3>=$F5,NOT(COUNTIFS(Holidays!$F$3:$F$34,JH$3)),JH$3<=$G5-1),8,""))
JH28:JQ28JH28=SUM(JH4:JH27)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M3:JQ27,JQ4:NR27,M5:NR27Expression=COUNTIFS(Holidays!$F$3:$F$34,M$3)textNO
4:50Expression=AND(NOT(ISBLANK($B4)),ISBLANK($A4))textNO
 
Upvote 0
Ok no idea what happend here but its working now? I just cut and pasted the last row to row 1 and copied it over? Must have been something with formatting? Any explanation?
Cell Formulas
RangeFormula
IX1:JG1IX1=IF(SUM(IX4:IX27)=0,"",SUM(IX4:IX27))
IX2,JC2IX2=CHOOSE(MONTH(IZ3),"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")
IX3:JG3IX3=WORKDAY(IW3,1)
IX4:JG4IX4=IF($G4="","",IF(AND(IX$3>=$F4,NOT(COUNTIFS(Holidays!$F$3:$F$34,IX$3)),IX$3<=$G4),8,""))
IX5:JG27IX5=IF($G5="","",IF(AND(IX$3>=$F5,NOT(COUNTIFS(Holidays!$F$3:$F$34,IX$3)),IX$3<=$G5-1),8,""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
M3:JQ27,JQ4:NR27,M5:NR27Expression=COUNTIFS(Holidays!$F$3:$F$34,M$3)textNO
4:27,29:50,A28:JB28,JV28:XFD28Expression=AND(NOT(ISBLANK($B4)),ISBLANK($A4))textNO
M1:NR1Expression=AND(NOT(ISBLANK($B28)),ISBLANK($A28))textNO
 
Upvote 0
The only logical explanation is the calculation was set to manual in this question. Therefore, I am marking the corresponding answer as the solution.
 
Upvote 0

Forum statistics

Threads
1,215,529
Messages
6,125,345
Members
449,220
Latest member
Edwin_SVRZ

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