I am working on a process to remove inactive users from a system that we are trying to automate. The problem is we decided we want a 30 day buffer on deleting users and our current system does not make that easy.
I can export a list of all inactive users ever and a list of users made inactive in the past 30 days but not a list of users made inactive older than 30 days. I know using a basic vlookup and then remove the matches but we intend to run this process nightly and automate it so that is not the best method. I am fairly new to macros and only have basic knowledge but it seems like this should be easy to do with a macro.
-Excel1.xlsm opens "AllInactiveUsers.xlsx" and "Last30InactiveUser.xlsx"
-Writes a vlookup in Column B comparing Column A in AllInactiveUsers to Column A [ =VLOOKUP(A2,[Last30InactiveUser.xlsx]Sheet1!$A:$A,1,FALSE) ]
-Removes all matches from AllInactiveUsers
-Saves AllInactiveUsers
-Closes all documents
We have a software that can open "Excel1.xlsm" and I am pretty sure I can set it up to auto-run when opened.
Both sheets produce documents with a running list of users in column A like below. The list of users change between each month so I cannot define the number of rows required for the vlookup. If any of this needs clarity I can try to help where needed
[TABLE="width: 500"]
<tbody>[TR]
[TD]Users[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0000001[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0000002[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I can export a list of all inactive users ever and a list of users made inactive in the past 30 days but not a list of users made inactive older than 30 days. I know using a basic vlookup and then remove the matches but we intend to run this process nightly and automate it so that is not the best method. I am fairly new to macros and only have basic knowledge but it seems like this should be easy to do with a macro.
-Excel1.xlsm opens "AllInactiveUsers.xlsx" and "Last30InactiveUser.xlsx"
-Writes a vlookup in Column B comparing Column A in AllInactiveUsers to Column A [ =VLOOKUP(A2,[Last30InactiveUser.xlsx]Sheet1!$A:$A,1,FALSE) ]
-Removes all matches from AllInactiveUsers
-Saves AllInactiveUsers
-Closes all documents
We have a software that can open "Excel1.xlsm" and I am pretty sure I can set it up to auto-run when opened.
Both sheets produce documents with a running list of users in column A like below. The list of users change between each month so I cannot define the number of rows required for the vlookup. If any of this needs clarity I can try to help where needed
[TABLE="width: 500"]
<tbody>[TR]
[TD]Users[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0000001[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]0000002[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]