What about this for S33?
VBA Code:Range("S33").Formula = Replace("=IF(SUMPRODUCT(--(YEAR($C$32:$C$#)=R33),$Q$32:$Q$#)>0,SUMPRODUCT(--(YEAR($C$32:$C$#)=R33),$Q$32:$Q$#),"""")", "#", Range("T13").Value)
Hello,
I’m back with an issue I’m having with a formula in a range of cells. This is in addition to my previous post (maybe I should have created a now post – not sure of the protocol). I’m not sure what is causing the problem. It appears the formula(s) are dependent on another set of cells. I’ll try to explain:
If I enter a value in K9, K11, or K13, it has an impact on formulas in column I (rows 33+) which affects results in column S (rows 33+). What’s weird is if I enter a small number (<11) in cells K9, 11, or 13 all works fine. However, if I enter a larger number (which varies between the K9,11,13 – some are >11, others >44), the values in column S display #Value!.
The value entered into cells K9, K11, K13 is displayed in the row in column I that corresponds to the date in cells K8, K10, or K12. That is, if the value in column I is greater than the accepted input, the #Value! is displayed in column S.
I have uploaded an abridged copy of my spreadsheet (TryMe) to DropBox.
Dropbox
I have removed most all coding leaving only one function in Module1. I did this in an effort to figure out what may be causing this problem.
As a display/example of what I am talking about, enter a large number (say 100) into either cell K9, K11, or K13 (yellow cells). You will see the #Value! appear in column S (green cells).
Thanks for viewing,
Steve K.