Reputation: 11
I have two rows in Excel and following command:
IF(COUNT(H2:U2)>0;SUMPRODUCT(H2:U2;H1:U1)/SUM(H1:U1);"")
Now I only want to divide by the sum of those numbers in line 1, if the row below has an actual value. So if J2 has no value for example, I only want to devide the SUMPRODUCT by H1 till U1 without J1.
Is there any nice way to do that?
Upvotes: 1
Views: 1534
Reputation: 1439
=IF(ISEMPTY(J2),"",IF(COUNT(H2:U2)>0,SUMPRODUCT(H2:U2,H1:U1)/SUM(H1:U1),""))
You can replace my commas with semicolons. Let me know if this works. It's not clear from your post whether you actually mean rows or columns (perhaps you can show part of the actual table). I'm not sure what you're trying to do. When you say "the row below", you would be referring to "H3" rather than "J2" - so perhaps you mean column?
Upvotes: 1