Hey DonkeyOte
The formula works correctly until example 7 it calculates a total of 8914 when it should be 4016
The first 6 examples the formula works great.
Thanks
Hey DonkeyOte
The formula works correctly until example 7 it calculates a total of 8914 when it should be 4016
The first 6 examples the formula works great.
Thanks
Last edited by DonkeyOte; 09-25-2011 at 01:51 AM. Reason: unnecessary quote removed
@Killer17, no need to quote prior posts in their entirety in your replies (only relevant parts)
Yes, it dawned on me whilst out yesterday afternoon that I had left a legacy reference in the formula (C43) which would generate the error you outline.Originally Posted by Killer17
On further reflection, if we can assume:
1. that where a # (Col B etc) is "active" a balance will always exist in the first column
2. that the # (Col B etc) will always be 1:12
then we can simplify slightly
![]()
D3: =SUM(C4:F15)+IF(COUNT(C4:C15)<6,SUMPRODUCT(((MOD(B16:B27-1,6)+1)>(MOD(COUNT(C4:C15)-1,6)+1))*C16:E27))
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
=SUM(C4:F15)+IF(COUNT(C4:C15)<6,SUMPRODUCT(((MOD(B16:B27-1,6)+1)>(MOD(COUNT(C4:C15)-1,6)+1))*C16:E27))
Hey DonkeyOte thanks for the help that works perfect.
I do have other question if I wanted to extend the Col B cells from 1:12 to 1:34 how would I go about doing this?
Thanks again!
Last edited by Killer17; 09-25-2011 at 08:10 PM.
The formula works great on the test sheet but when I transfer it to my real page it’s not calculating correctly. I know the reason why
Here's the formula I have adjusted.
In Cell G27:I60 I have formula and its returning a result of 0 because no data has been entered.![]()
=SUM(G27:I60)+IF(COUNT(G27:G60)<17,SUMPRODUCT(((MOD(D61:D94-1,17)+1)>(MOD(COUNT(G27:G60)-1,17)+1))*G61:I94))
With your formula is reading it as data and it’s doing the calculation incorrectly because of the zero’s in cells G27:I60
Thanks
If 0 is never a valid result then you might change the pre-emptive COUNT test to a COUNTIF test
The above assumes G27:G60 will only ever contain numerics.![]()
=SUM(G27:I60)+IF(COUNTIF(G27:G60,"<>0")<17,SUMPRODUCT(...etc...))
If the above does not reflect reality I would suggest posting a representative sample file.
Ok Made the changes to the formulaIf the above does not reflect reality I would suggest posting a representative sample file.
and it's still not adding up correctly.![]()
=SUM(G27:I60)+IF(COUNTIF(G27:G60,"<>0")<17,SUMPRODUCT(((MOD(D61:D94-1,17)+1)>(MOD(COUNTIF(G27:G60,"<>0")-1,17)+1))*G61:I94))
I have added an example sheet
Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks