ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to set up an automatic SUMIF function (https://www.excelbanter.com/excel-programming/290556-how-set-up-automatic-sumif-function.html)

yalex[_5_]

How to set up an automatic SUMIF function
 
I am trying to automatically sum all values with the same account ID.
I’ve tried using the SUMIF function but that required me to specif
what the account ID I would like it to search for. I would like th
macro to automatically search within a specific column and whenever i
finds a duplicated account ID, to sum the values of the duplicate
account ID. For example, if there are two account 900, one displayin
a positive 50 and the other a negative 25. I would like it to su
those two numbers together so that I only have one row showing fo
account 900.

Any help is much appreciated.

yale

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

How to set up an automatic SUMIF function
 
select the IDs with the first cell at the top being a header like ID, and
then do Data=Filter=Advanced Filter, choose copy to another location,
leave criteria blank, check the box for Uniques.

Click OK and you will get a unique list of Account ID's.

now put your sumif formula next to this

assume these are in column M and formula in N, original data with ID's in A
and column to Sum C

in N1
=sumif(A:A,M1,C:C)

and drag fill down next to your values.

--
Regards,
Tom Ogilvy

"yalex " wrote in message
...
I am trying to automatically sum all values with the same account ID.
I've tried using the SUMIF function but that required me to specify
what the account ID I would like it to search for. I would like the
macro to automatically search within a specific column and whenever it
finds a duplicated account ID, to sum the values of the duplicated
account ID. For example, if there are two account 900, one displaying
a positive 50 and the other a negative 25. I would like it to sum
those two numbers together so that I only have one row showing for
account 900.

Any help is much appreciated.

yalex


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 11:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com