alketrazz
New Member
- Joined
- Nov 13, 2013
- Messages
- 23
- Office Version
- 365
- Platform
- Windows
Hi
I have this formula
This should sum the values in column F
Column P where the value = to column G45
Column O where the value is either GBC, GBN, STK, VOR, or if all selected, include any of the values in the sum
Column N where the value is either 2 or 4, or if all selected, include any of the values in the sum
This is returning nothing. if I exclude the column O part or the column N part it works, but having both, doesn't work.
The other way I thought of doing this was with SUMPRODUCT, but that then relies on knowing how many rows there are as can't reference the entire column.
Any ideas ?
I have this formula
VBA Code:
=SUM(SUMIFS(Data!$F:$F,Data!$P:$P,VolumePlan!$G45,Data!$O:$O,IF(nStockType="ALL",{"GBC","GBN","STK","VOR"},nStockType),Data!$N:$N,IF(nUnit="ALL",{2,4},nUnit)))
This should sum the values in column F
Column P where the value = to column G45
Column O where the value is either GBC, GBN, STK, VOR, or if all selected, include any of the values in the sum
Column N where the value is either 2 or 4, or if all selected, include any of the values in the sum
This is returning nothing. if I exclude the column O part or the column N part it works, but having both, doesn't work.
The other way I thought of doing this was with SUMPRODUCT, but that then relies on knowing how many rows there are as can't reference the entire column.
Any ideas ?