ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   sum all value (https://www.excelbanter.com/excel-worksheet-functions/158986-sum-all-value.html)

ijenc

sum all value
 
Sum up all value in column x when column y = specified value


Example:

Id number value
123 1
123 4
123 1
123 2
789 3
789 3
789 4

I am trying to get one unique ID number with sum of its value and have that
returned on to a different wooksheet. For example:

Id Number Value
123 8
789 10

The worksheet that contains these data has hundreds of ID and I am trying to
write a vba code that does this function; however, I have no idea where to
start.

Thank you


Sandy Mann

sum all value
 
Try:

=SUMIF(Sheet1!A1:A1000,123,Sheet1!B1:B1000)

Change the Sheet name to suit your needs. If the sheet name contains a
space then enclose it in single quotes like:
'This Sheet'!A1:A1000

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk




"ijenc" wrote in message
...
Sum up all value in column x when column y = specified value


Example:

Id number value
123 1
123 4
123 1
123 2
789 3
789 3
789 4

I am trying to get one unique ID number with sum of its value and have
that
returned on to a different wooksheet. For example:

Id Number Value
123 8
789 10

The worksheet that contains these data has hundreds of ID and I am trying
to
write a vba code that does this function; however, I have no idea where to
start.

Thank you






All times are GMT +1. The time now is 11:14 AM.

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