Remove duplicate data from Excel sheet

Cyndi2210

New Member
Joined
Jul 12, 2018
Messages
17
Office Version
  1. 2016
Platform
  1. Windows
The excel sheet has multiple lines for the hours, however I need the sum of regular & overtime hours to show only in the top row for each person. Each person could have 1 to 4 lines. The data is contained within a query.

Screenshot 2024-01-19 105916.jpg
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Is the hours column also a result from the query? I suppose that doesn't really matter, you can just fill that column with the below formula after the query is run to get the result as below:

Book1 1-18-2024.xlsm
ABCDEFGHIJKLM
1Last NameFirst NameSSNHoursEarningType401K401L401L2RothGross EarningsRegular HoursOvertime Hours
2SmithJohn40400
3SmithJohn 400
4SmithSally50.414010.41
5KernsMarc40400
6KernsMarc 400
7BrownRobert47.5407.5
8BrownRobert 407.5
9BrownRobert 407.5
10CameronJoshua40400
11CameronJoshua 400
12CarterAmanda49.24409.24
13CastleMollie50.324010.32
14CastleMollie 4010.32
15BatesRichard69.164029.16
16BatesRichard 4029.16
17BatesRichard 4029.16
18BatesRichard 4029.16
Sheet7
Cell Formulas
RangeFormula
D2:D18D2=IF(COUNTIFS($A$2:A2,A2,$B$2:B2,B2)=1,SUM(L2:M2),"")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,449
Messages
6,124,911
Members
449,195
Latest member
Stevenciu

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