ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   duplicate data, if command in VBA (https://www.excelbanter.com/excel-programming/343045-duplicate-data-if-command-vba.html)

VB123

duplicate data, if command in VBA
 

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

--
VB12
-----------------------------------------------------------------------
VB123's Profile: http://www.excelforum.com/member.php...fo&userid=2816
View this thread: http://www.excelforum.com/showthread.php?threadid=47689


Executor

duplicate data, if command in VBA
 
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é.


VB123[_2_]

duplicate data, if command in VBA
 

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

--
VB12
-----------------------------------------------------------------------
VB123's Profile: http://www.excelforum.com/member.php...fo&userid=2816
View this thread: http://www.excelforum.com/showthread.php?threadid=47689


Executor

duplicate data, if command in VBA
 
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é


Tom Ogilvy

duplicate data, if command in VBA
 
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.

--
Regards,
Tom Ogilvy


"VB123" wrote in
message ...

Excel isn't recognizing that formula. It says there is an error in my
formula and highlights 3dsumif. Is there something special I need to
do?


--
VB123
------------------------------------------------------------------------
VB123's Profile:

http://www.excelforum.com/member.php...o&userid=28166
View this thread: http://www.excelforum.com/showthread...hreadid=476893





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

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