Excel macros are killing me!

brogi_bear

New Member
Joined
Mar 3, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Hi all... newbie here

I have been tasked to create a macro for HR regarding insurance bills in which i have to compare two different files- and they are not formatted the same (for example one has department codes, the other doesn't and has items in different rows and columns.) What both documents have in common though are names (first & last), the type of Premium (insurance plan type) and the total of that premium per person such as: Joe Dirt | $107.07 | Dental Plan. Although it would be ideal to replicate the dept code from one to another i can't figure how i can do that from different files. The end goal is to highlight the differences between both files and highlight in green if it matches, yellow if it doesn't match, and red if there is missing info. Does anyone know how i can achieve the end goal? or where i can start, as i cant find a formula that can meet these demands, i am starting to think it is impossible.

thanks!! I appreciate any insight and pointers!
 

Attachments

  • help.png
    help.png
    42.5 KB · Views: 18
The macro will work with any name. The macro first checks to see if the name in List Bill exists in downloadbill. If it doesn't exist, it skips to the next name without coloring any cells because it has no data to compare in downloadbill since that name doesn't exist in that sheet. Does this make sense?
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Yes sorry, i found why it was doing that! i appreciate the help a lot and thanks for the material you shared!
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,298
Members
449,077
Latest member
Rkmenon

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