Need Help in VBA Codes

Manoj_Mishra

New Member
Joined
Oct 6, 2017
Messages
1
I have an excel sheet with multiple columns (A,B,C,D,E,F) below
Date WorkedProjectNameCodeService DeliverWorked Hours
9/14/2017AlfaRam123Quality Check2.5
9/14/2017AlfaRam123No Work2.5
9/14/2017AlfaXYZ579Quality Check2.5
9/14/2017AlfaXYZ579No Work2.0
9/14/2017AlfaABC932Quality Check2.5
9/14/2017BetaABC932No Work2.5
9/14/2017BetaRam123Quality Check2.5
9/14/2017BetaRam123No Work2.5
9/14/2017AlfaXYZ579Quality Check2.5
9/14/2017AlfaXYZ579No Work2.5
9/14/2017GamaABC932Quality Check2.5
9/14/2017GamaABC932No Work2.0
9/14/2017GamaRam123Quality Check2.5
I want to remove the duplicates rows by grouping data columns (A,B,C,D,E,) but summing the values in the G column corresponding to the repeating rows as shown in below image.

Date WorkedProjectNameCodeService DeliverWorked Hours
9/14/2017AlfaRam123Quality Check7.5
9/14/2017AlfaRam123No Work2.5
9/14/2017BetaRam123No Work2.5
9/14/2017BetaABC932No Work2.5
9/14/2017GamaABC932No Work2.0
9/14/2017AlfaABC932Quality Check2.5
9/14/2017GamaABC932Quality Check2.5
9/14/2017AlfaXYZ579Quality Check5.0
9/14/2017AlfaXYZ579No Work4.5

<tbody>
</tbody><colgroup><col><col><col><col><col><col></colgroup>




<tbody>
</tbody><colgroup><col><col><col><col><col><col></colgroup>
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You could copy the data, remove duplicates in the first five columns, and use a formula:

A​
B​
C​
D​
E​
F​
G​
H​
I​
J​
K​
L​
M​
N​
1​
Date Worked
Project
Name
Code
Service Deliver
Worked Hours
Date Worked
Project
Name
Code
Service Deliver
Worked Hours
2​
9/14/2017​
AlfaRam
123​
Quality Check
2.5​
9/14/2017​
AlfaRam
123​
Quality Check
2.5​
M2: =SUMIFS($F$2:$F$14, $A$2:$A$14, H2, $B$2:$B$14, I2, $C$2:$C$14, J2, $D$2:$D$14, K2, $E$2:$E$14, L2)
3​
9/14/2017​
AlfaRam
123​
No Work
2.5​
9/14/2017​
AlfaRam
123​
No Work
2.5​
4​
9/14/2017​
AlfaXYZ
579​
Quality Check
2.5​
9/14/2017​
AlfaXYZ
579​
Quality Check
5.0​
5​
9/14/2017​
AlfaXYZ
579​
No Work
2.0​
9/14/2017​
AlfaXYZ
579​
No Work
4.5​
6​
9/14/2017​
AlfaABC
932​
Quality Check
2.5​
9/14/2017​
AlfaABC
932​
Quality Check
2.5​
7​
9/14/2017​
BetaABC
932​
No Work
2.5​
9/14/2017​
BetaABC
932​
No Work
2.5​
8​
9/14/2017​
BetaRam
123​
Quality Check
2.5​
9/14/2017​
BetaRam
123​
Quality Check
2.5​
9​
9/14/2017​
BetaRam
123​
No Work
2.5​
9/14/2017​
BetaRam
123​
No Work
2.5​
10​
9/14/2017​
AlfaXYZ
579​
Quality Check
2.5​
9/14/2017​
GamaABC
932​
Quality Check
2.5​
11​
9/14/2017​
AlfaXYZ
579​
No Work
2.5​
9/14/2017​
GamaABC
932​
No Work
2.0​
12​
9/14/2017​
GamaABC
932​
Quality Check
2.5​
9/14/2017​
GamaRam
123​
Quality Check
2.5​
13​
9/14/2017​
GamaABC
932​
No Work
2.0​
14​
9/14/2017​
GamaRam
123​
Quality Check
2.5​
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,528
Messages
6,125,338
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top