sum all value

I

ijenc

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
 
S

Sandy Mann

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

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top