#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,345
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"