key sheet based macro

Tonyk1051

Board Regular
Joined
Feb 1, 2021
Messages
132
Office Version
  1. 2019
Platform
  1. Windows
Hi,

Everyday i have to review changes made by several users and it takes around an hour to do.... in the keysheet attached is a list of categories my dept uses and the word "yes" means he/she is authorized to use that category. to the right is the name of every user and which dept they belong to. Example:some users belong to "warehouse" you'll see that the warehouse users are only allowed to use one or two categories anything else i will mark no in the actual spread sheet "user activity"

In the user activity spreadsheet, tab "category change detail"

the column that says "authorized" i put yes if the categories in column F follow the keysheet, if a cell in column F is blank then i leave it blank, if its a category that not marked yes in the keysheet then i put the word no

when all done i sort the entire spread sheet by column D and look for any duplicates. Any ID which is duplicate I color (light blue) the line that has an earlier date
so ID:7716899 appears twice, one has 5:30pm the other has 6:00pm , the one that is 5:30pm is colored . then i call it day.

hopefully someone can help me

key sheet.xlsx keysheet

RTV User Activity 2023-01-06.xlsm spreadsheet to apply macro
 
The way breynolds0431 has written the code adding more user names in the user to group mapping table will work fine.
Adding more user "columns" however will move columns M:N which are hard coded in the code.

Change the line of code below and that should address the additional column issue.
Rich (BB code):
' Replace the next line
'Dim ulRng As Range: Set ulRng = xWB.Sheets(1).Columns("M:N")
' With this line
Dim ulRng As Range: Set ulRng = xWS.Cells(1, Columns.Count).End(xlToLeft).CurrentRegion
Breynolds and Alex, thank you guys for the help. much appreciated
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Thanks for letting us know. Glad we could help.
Can I suggest that you mark breynolds post #2 as the solution, the other posts are only minor tweaks based on some slight changes to the requirements, and won't help others as much the post #2 will.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,286
Members
452,902
Latest member
Knuddeluff

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