Home > other >  SUMIF only where value in column is a multiple of 100 in Google Sheets
SUMIF only where value in column is a multiple of 100 in Google Sheets

Time:09-30

I need to add values (expenses) from a column, only if the value in another column (accounts) is a multiple of 100.

We have a table where one column (A) has accounts and sub-accounts numbers (100,200,300, 303, 303.1,400, etc.) and another column (B) with expenses.

I'm looking for a formula in Google Sheets to sum all values in column B, only if the account number is a multiple of 100 (100,200,300...).

I'd appreciate any advice!

CodePudding user response:

try:

=SUM(FILTER(B1:B, NOT(ISNUMBER(SEARCH(".", (A1:A/100))))))

enter image description here

or just:

=SUM(FILTER(B:B; MOD(A:A; 100)=0))

enter image description here

or even:

=INDEX(SUMIF(MOD(A:A; 100); 0; B:B))

enter image description here

works too:

=SUMPRODUCT((MOD(A:A; 100)=0)*B:B)

enter image description here

  • Related