Copy only those rows that have green highlighted cells on random columns

Sunnyji

New Member
Joined
Nov 6, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi,
I am new to VBA. I have just started learning the VBA. I have to create a Macro or small VBA code for a task.
I have to compare every month, the new month's sheet with the previous month's sheet to find out the changes that occur in the new month's sheet. My sheet contains rows between 1150 ~ and 1200 and it has columns
A to W(A: W). Both sheets have different numbers of rows as some rows are deleted and some new rows are added in the new month's file. Colum A always contains a unique value (ID# like 1, 2, 3,4,. . . .) that I use to compare
what ID has been deleted and what new ID has been added. Also, every month some small changes occur in some records between Columns A: W in the new sheets. (I have attached a sample with a small # of rows and just a few columns but the actual columns are A: W and rows almost 1200).
I want a short VBA code that should compare both the old Month's sheet and the new month's sheet to achieve the following result:
1) Highlight the whole row with blue color in the old Month's sheet (sheet1) where the old ID has been deleted.
2) Highlight the cells in the new month's(sheet2) with a yellow color that have been modified
3) Highlight the rows in the new month's sheet(sheet2)with green color where a new ID has been added and then copy from sheet 2 to sheet3 only those rows that have yellow highlighted cells and highlighted in green color

I heard many experts VBA programmers are on this site and they have been doing an amazing job helping people who want to learn VBA coding.

Best Regards,

Sunny

IDAnalyst NameDescriptionSite LocationTime assigned to work(hrs.)Time Spent (hrs.)Status
1​
MikeMike works to analyze scientific dataCalgary Downtown24:00:0028:00:00Completed
2​
KevinKevin analyze algorithmMontreal Uptown6:00:008:00:00in progress
3​
KumarKumar checks logic and formulaDelhi Capital18:00:0010:00:00InProgress
4​
JamalJamal makes sure quality assuranceLahore south72:00:0072:00:00Completed
5​
KishoreKishore works on facility and infrastructureBombay Central6:00:000:00:00Not started
6​
MarvinTake care of the security of the buildingLondon Downtown36:00:0054:00:00Pending
7​
JohnSupports ApplicationsBarrie North18:00:0036:00:00Completed
8​
BobbyLeads and supervises Incident ManagementBombay South10:00:0016:00:00InProgress
9​
DanielManages Covid Protocols and healthFlorida West6:00:000:00:00Not started
10​
SpencerInternet Service SpecialistSydney Downtown12:00:0016:00:00Pending

New Month's File
IDAnalyst NameDescriptionSite LocationTime assigned to work(hrs.)Time Spent (hrs.)Status
1​
MikeMike works to analyze scientific dataCalgary Downtown22:00:0028:00:00Completed
2​
KevinKevin analyze algorithmMontreal Uptown6:00:008:00:00Completed
3​
KumarKumar checks logic and formulaDelhi East18:00:0010:00:00InProgress
6​
MarvinTake care of the security of the buildingLondon Downtown36:00:0054:00:00InProgress
7​
JohnSupports Applications and DatabasesBarrie North18:00:0036:00:00Completed
8​
BobbyLeads and supervises Incident ManagementBombay South10:00:0020:00:00InProgress
9​
DanielManages Corvid Protocols and healthChicago North6:00:002:00:00InProgress
11​
KerbyModify the data. Data SpecialistToronto East18:00:000:00:00Not started
12​
RubyContact businesses. Business Coordinator.Toronto South24:00:0012:00:00Pending
13​
SumelTake care of electricity and energy facilityWashington South4:00:000:00:00Not started
 

Attachments

  • New SampleeExcel Image.png
    New SampleeExcel Image.png
    65.5 KB · Views: 9

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,215,693
Messages
6,126,248
Members
449,304
Latest member
hagia_sofia

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