Macro or Power Automate to Identify and Move "Washes" from the "Master" Sheet to the "Washes" Sheet

Madam_Xavier

New Member
Joined
Aug 26, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I appreciate everyone who takes a moment to read over the problem I'm trying to solve. The image below is a list of 10 records that equal a total of 4 sets of "Washes".


Problem:
Humans have to manually identify washes and remove from "Master" Sheet. We currently have to highlight all the negatives, then compare the nearby rows to see if Columns A, B, C, and D are identical. Then we have to compare the negative row with the surrounding rows to see which records are being washed out.

Ex.02: Red Box
On the 13th, Indiana submitted two records (5hrs and 3hrs) totaling 8hrs. So their dispatcher created a wash by creating only one record with -8.

Ex.01: Blue Box -
On the 15th, Indi submitted 4 hours worked for jobsite 68. However, it was corrected by his dispatcher and they created a Wash by duplicating the record and creating the hours worked to be a negative value.


Goal: To efficiently move these washes from the "Master" sheet to a "Washes" sheet.

Current Solution:
Every week, we receive a text file of all the labor records that need to be imported into our system. Use Text to Column to delimit the data with the Vertical Line (|) and then we use either conditional formatting where we input ( =0>$G1) OR Filter on G to find the negatives and then highlight the column (depending on the Analyst). Which then gives us a starting point to simply eyeball it and verify the Washes' by periodically checking the Sum in the bottom right-hand corner to see if it equals zero.

Desired Solution:
Preferably, I'd love to create a Macro or use Power Automate to consistently and accurately find all the potential washes, leaving the rest of the records alone. Then remove these washes from the "Master" sheet and move them to the "Washes" sheet.


Unfortunately, I'm the most experienced on the team when it comes to Excel, but the last time I needed to go this in depth was back in 2016, when I desperately learned about VBA and how to code a solution within a week. 😅 This amazing community helped me back then in identifying why my code kept failing.

So once again, I cast the MrExcel bat-signal 🦇 into the skies hoping to receive help.

Thank you,


1724858215199.png




NSL Trueup Template 20240826.xlsx
ABCDEG
2Emp # Emp NameJob Site Work_Date Pay per hour Hours_Worked
333010Jones, Indiana18521 2024-06-13 102.55-8
433010Jones, Indiana18521 2024-06-13 74.245
533010Jones, Indiana18521 2024-06-13 111.353
633010Jones, Indiana18168 2024-06-15 102.54-4
733010Jones, Indiana18168 2024-06-15 111.364
833010Jones, Indiana25331 2024-06-17 68.36-3
933010Jones, Indiana23468 2024-06-17 68.36-4
1033010Jones, Indiana25331 2024-06-17 68.37-1
1133010Jones, Indiana25331 2024-06-17 74.243
1233010Jones, Indiana23468 2024-06-17 74.234
1333010Jones, Indiana25331 2024-06-17 74.241
1433010Jones, Indiana23468 2024-06-18 68.36-8
1533010Jones, Indiana23468 2024-06-18 74.248
1633010Jones, Indiana43309 2024-08-02 174.886.75
1733010Jones, Indiana43472 2024-08-02 174.888
1833010Jones, Indiana43573 2024-08-02 217.624
1933010Jones, Indiana43472 2024-08-02 85.5-8
2033010Jones, Indiana43472 2024-08-02 170.998
Original
Cells with Conditional Formatting
CellConditionCell FormatStop If True
1:1048576Expression=0>$G1textNO
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Forum statistics

Threads
1,223,842
Messages
6,174,981
Members
452,596
Latest member
Anabaric

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