Cells C4 (product) and D4 (account) are changed manually. I need if one of the 2 is blank, SUM all the values. For example: if I choose a product sum all products of the accounts. This formula only changes when the two cells have information or both are blank
=IF(OR($C$4="",$D$4=""),SUMIFS(H20:H459,$G$20:$G$459,$G$4),SUMIFS(H20:H459,$E$20:$E$459,$C$4,$D$20:$D$459,$D$4,$G$20:$G$459,$G$4))
Solved by O. J. in 25 mins