duplicate data, if command in VBA

  • Thread starter Thread starter VB123
  • Start date Start date
V

VB123

Looking for some help with duplicate data. I have data in a table wher
the values in column (B) may repeat. Column (B) is a job number.
Column (C) is the number of hours charged to that Job. If the Jo
takes more than 8 hours there will be two records. In some cases
there are several records (job takes 100 hours). I can sort the tabl
by column (B) so all like job numbers are next to one another. How t
I get excel to recognize the duplicates in column B and sum th
corresponding data in column (C). I want to see the total hours fo
each job number. :confused:

Thanks
 
Hi VB123

I suggest you use sheet1 for all the registrations.
On sheet2 in column A list all the used numbers from column B of sheet1
only ones.
In column B of sheet2 you insert the formula
=SUMIF(Sheet1!B:B, A1, Sheet1:C:C)

Change the format for Column B of Sheet2 into "[h]:mm" to keep all
the hours shown.
Otherwise you will get the results in full days of 24 hours.

Hoop That Helps,

Wouter Magré.
 
Excel isn't recognizing that formula. It says there is an error in m
formula and highlights 3dsumif. Is there something special I need t
do
 
In your reply I see 3dsumif.

It should be

=SUMIF

so beginning with the equals sign.

Look up the SUMIF function in your helpfile.

Wouter Magré
 
Do you use commas as a list separator or semi colon. If semi colon, change
the formula to

=SUMIF(Sheet1!B:B; A1; Sheet1:C:C)

in either case, make sure the formula is not located in column B or C.
 

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

Back
Top