Reputation: 311
UPDATE: I ran a script which re-enabled automatic calculation, enabled the screen updating and all the other good stuff and the functions now work. I'm moving forward with the impression it was yet another Excel visual glitch and the functions were working, just the screen was somehow breaking these cells.
Thank you everyone for your rapid responses and support, I was loosing it.
Initial Issue:
This has been driving me crazy. I built a function with COUNTIFS() in Excel, which finds the number of times in a column, this work week is listed, when the model number matches. The models are 6.3, 6.4, and 6.5. For models 6.3 and 6.4, the function work and does all the calculation correctly. For the 6.5, even if the function is exactly the same, it does not. In fact, when I evaluate the function, I get the right math as a result (it should be 3-2 = 1), yet it ends up as 0:
I can't give too many details of the functions due to proprietary information disclosure. However, I can show you what data it is reading with every other column and row hidden, so I apologize if it looks messy, the only two arrays in the COUNTIFS() functions (top bright red and green boxes, with associated model number underlined above) are matching the model number to the far left column (in yellow, red and light green), and today (1921) work week and year to the second to the left column (in dark and light green):
I can show you the functions do work, when I switch the first row's model from a 6.3 to a 6.4, the appropriate change for 6.3 switches from a count of 1 to a count of 0, and that of the model 6.4 changes from a count of 5 to a count of 6:
However, when I switch the first row's model to a 6.5, both the 6.3 and the 6.4 COUNTIFS() correctly update (0 and 5 consecutively), but not the 6.5 (still 0, should show 2 now):
Just to prove to you, I run "Evaluate Formula" on the cell, and the result is correct (4-2), yet the last step it craps out and shows 0:
A simplified version of the function is:
=COUNTIFS(ModelArray,ModelNumber,WorkWeekArray,INDEX(WorkWeekArray,MATCH((NUMBERVALUE(RIGHT(YEAR(NOW()),2)&TEXT((WEEKNUM(NOW(),21)),"00"))),WorkWeekArray,0)))- COUNTIFS(ModelArray,ModelNumber,ModelStatus,StatusIsRed,WorkWeekArray,INDEX(WorkWeekArray,MATCH((NUMBERVALUE(RIGHT(YEAR(NOW()),2)&TEXT((WEEKNUM(NOW(),21)),"00"))),WorkWeekArray,0)))
Each WorkWeekArray value listed is also computed using the same NUMBERVALUE() Function:
NUMBERVALUE(RIGHT(YEAR(ModelDate),2)&TEXT((WEEKNUM(ModelDate,21)),"00")
Please help, I'm loosing my mind and this is a critical tool I'm building. It makes me look bad when the software isn't functioning as it should! Thank you in advance :)
Appendix for Comments:
Upvotes: 1
Views: 194
Reputation: 422
Wish I could comment because this isn't really a good answer. I'll keep editing it as I come up with more suggestions. Try this:
Upvotes: 1