Formula doesn't work in XLS but fine in XLSM file?

CordingBags

New Member
Joined
Mar 7, 2022
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
I have the following formula, provided by StephenCrump following an earlier question "Countifs Number Of Times Team Play on each weekday"
(many thanks) Stephen
=SUM((INDEX(D1:D198,2+3*INT((ROW(D1:D198)-ROW(D1))/3))=AC20)*(H1:N198=Y21))
this works real well if applied to the original XLSM file but not when used in "the same" XLS file.

All I have done different is to change the file save type.

Unfortunately I am forced to use XLS format for compatibility
I cannot see anything in the formula that is specifically XLSM and that shouldn't work in an XLS file. The XLS file just seems to ignore the formula and makes no change regardless of the data input.

Any help appreciated
Thanks

Paul
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
What if, you enter the formula using CTRL+SHIFT+ENTER?
 
Upvote 0
Dismiss previous message, I was still editing but ran out of time.

Didn't the compatibility checker give you a clue when you saved the file?
Only thing I see in this formula, it's an array formula, that in legacy Excel needs to be confirmed using CTRL+SHIFT+ENTER. Normally, the conversion is build in. As shown below.
Or might it be the macro (since you have .xlsm) has turned of the auto calculation? Does clicking F9 forces a recalculation?
1714834190716.png
 
Upvote 0
edit with Excel 2016, try using SumProduct
The alternative does not require the Day column but the dates are shown for each relevant row.

Book1
ABCDEFGHIJKLMN
1TESTDayTimeDateR1R2R3R4R5R6R7
2TeamL440.7708333Wed Oct 2, 24L1L3L4L2
3Day4Wed Oct 2, 24L7L5L8L6
4Count3DayTimeDateR1R2R3R4R5R6R7
530.7708333Tue Oct 15, 24L7L1L3L2
6TeamL4Tue Oct 15, 24L8L6L4L5
7Day4DayTimeDateR1R2R3R4R5R6R7
8Count350.7708333Thu Oct 24, 24L2L1L3L7
9Thu Oct 24, 24L4L5L8L6
10DayTimeDateR1R2R3R4R5R6R7
1120.7708333Mon Oct 28, 24L7L6L1L2
12Mon Oct 28, 24L5L8L4L3
13DayTimeDateR1R2R3R4R5R6R7
1460.7708333Fri Nov 8, 24L2L1L6L7
15Fri Nov 8, 24L8L3L5L4
16DayTimeDateR1R2R3R4R5R6R7
1740.7708333Wed Nov 13, 24L5L7L2L6
18Wed Nov 13, 24L8L3L1L4
19DayTimeDateR1R2R3R4R5R6R7
2040.7708333Wed Nov 20, 24L7L5L6L1
21Wed Nov 20, 24L2L4L3L8
22
4c
Cell Formulas
RangeFormula
B4B4=SUMPRODUCT((INDEX(D1:D21,2+3*INT((ROW(D1:D21)-ROW(D1))/3))=B3)*(H1:N21=B2))
B8B8=SUMPRODUCT((IFERROR(WEEKDAY(F1:F22)=B3,0)*(H1:N22=B2)))
 
Last edited:
Upvote 0
Dismiss previous message, I was still editing but ran out of time.

Didn't the compatibility checker give you a clue when you saved the file?
Only thing I see in this formula, it's an array formula, that in legacy Excel needs to be confirmed using CTRL+SHIFT+ENTER. Normally, the conversion is build in. As shown below.
Or might it be the macro (since you have .xlsm) has turned of the auto calculation? Does clicking F9 forces a recalculation?
View attachment 110972
Thanks for the pointer, unfortunately I didn't / don't understand the formula well enough to appreciate the difference.
Suffice to say I will work with the XLSM file until final edit and then save it with the correctly calculated details as an XLS to upload.
The workbook now contains nearly 1600 entries spread over 16 tabs that would each presumably individually need to be changed :(:(
The XLSM works so path of least resistance
Thanks
Paul
 
Upvote 0
Did you try post # 4.
N.B.
• You can post the post to a clean sheet, Click on the icon below to f(x) in the heading, move to your sheet cell A1 and paste.
• Review the formulas with Formulas Review Formula
• For Excel 2016, the SumProduct formulas should work or you can edit the formulas that were suggested earlier and enter the formulas
with Ctrl+Shift+Enter not just enter.
 
Upvote 0
Yes it was =SUMPRODUCT((INDEX(D1:D21,2+3*INT((ROW(D1:D21)-ROW(D1))/3))=B3)*(H1:N21=B2)) from post 4 that I applied to my workbook changing the data ranges where required that worked fine in XLSM, just not when I saved the file as XLS.
Though the results are stored which is all I need at that stage.
Thanks
Paul
 
Upvote 0
T202404.xlsm
ABCFGHIJKLMN
1Number of Wins by Weekday Excel 2016
2TESTDateR1R2R3R4R5R6R7
3TeamL4Wed Oct 2, 24L1L3L4L2
4Day4Wed Oct 2, 24L7L5L8L6
5Count3DateR1R2R3R4R5R6R7
6Count3Tue Oct 15, 24L7L1L3L2
7Tue Oct 15, 24L8L6L4L5
8DateR1R2R3R4R5R6R7
9Thu Oct 24, 24L2L1L3L7
10Thu Oct 24, 24L4L5L8L6
11DateR1R2R3R4R5R6R7
12Mon Oct 28, 24L7L6L1L2
13Mon Oct 28, 24L5L8L4L3
14DateR1R2R3R4R5R6R7
15Fri Nov 8, 24L2L1L6L7
16Fri Nov 8, 24L8L3L5L4
17DateR1R2R3R4R5R6R7
18Wed Nov 13, 24L5L7L2L6
19Wed Nov 13, 24L8L3L1L4
20DateR1R2R3R4R5R6R7
21Wed Nov 20, 24L7L5L6L1
22Wed Nov 20, 24L2L4L3L8
23
4c
Cell Formulas
RangeFormula
B5B5=SUM((INDEX(D2:D22,2+3*INT((ROW(D2:D22)-ROW(D2))/3))=B4)*(H2:N22=B3))
B6B6=SUMPRODUCT((IFERROR(WEEKDAY(F2:F23)=B4,0)*(H2:N23=B3)))
 
Upvote 0

Forum statistics

Threads
1,216,082
Messages
6,128,716
Members
449,464
Latest member
againofsoul

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