SUMIF with INT

jferrer288

New Member
Joined
May 10, 2021
Messages
4
Office Version
  1. 365
  2. 2013
Platform
  1. Windows
Hi, I have this table (its spanish so decimals are commas)
I want it to add items as a new total in G66 if the integer in column a is the same as the reference number in A66, but it seems it wont work on a range.
=SUMIF(A14:A58;INT(A14:A58)=A66;G14:G58)
Thanks for the help

2021-05-10 (1).png
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
sorry, so if A66=16 the sum in G66 should be equal to g29+g30+g31+g32+g33 = 9961.50
 
Upvote 0
Welcome to the Board!

You cannot use INT with SUMIF like that, but you can use it with SUMPRODUCT, i.e.
Excel Formula:
=SUMPRODUCT(--(INT(A14:A58)=A66),--(G14:G58))
or in your case:
Excel Formula:
=SUMPRODUCT(--(INT(A14:A58)=A66);--(G14:G58))
 
Upvote 0
Solution
Welcome to the Board!

You cannot use INT with SUMIF like that, but you can use it with SUMPRODUCT, i.e.
Excel Formula:
=SUMPRODUCT(--(INT(A14:A58)=A66),--(G14:G58))
or in your case:
Excel Formula:
=SUMPRODUCT(--(INT(A14:A58)=A66);--(G14:G58))
Doesnt seem to work, thanks for the feedback though
 

Attachments

  • 2021-05-10 (2).png
    2021-05-10 (2).png
    80.6 KB · Views: 23
Upvote 0
On closer inspection, it looks like the values in column A, in rows 14:58 are entered as Text and not as numbers (you can tell by the little triangle in the corner of the cell).
The INT function only works on numbers. Try converting those values to numbers, and it should work. You should be able to do that with "Text to Columns" from the Data menu.
Just select column A, go to "Text to Columns" on the Data menu, and click "Finish".
 
Upvote 0
Another option if they are text would be
Excel Formula:
=SUMPRODUCT((LEFT(A14:A58,LEN(A66))=A66&"")*(G14:G58))
 
Upvote 0
Try the example in my post and then adapt to your data.
N.B. You can post a concise example with the forums tool XL2BB.

T202105a.xlsm
ABCDEFG
1
216.110
316.520
41630
522.5100
625200
715200
8
91660
2a
Cell Formulas
RangeFormula
C9C9=SUMPRODUCT(--(INT(A2:A7)=A9),G2:G7)
 
Upvote 0
You are welcome. Glad we could help.
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,375
Members
448,888
Latest member
Arle8907

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top