A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hello RonGorman
I'm Diane, an M365 Apps & Services MVP and I’m happy to help you today.
VBA is enabled in Excel - you will need to change the VBA macro security settings in File > Options > Trust Center > Trust Center Settings. Set it on Enable VBA macros (not recommended; potentially dangerous code can run) for now - if you only need the macro once, change it the security after you run the macro. If you need the macro frequently, you can selfsign it.
Next: back in File > Options > Customize Ribbon, add a check in front of Developer. (on the right) You can open the VB Editor from there or using Alt+F11
Right click on a sheet or the workbook name, choose Insert > Module. Paste the code into the module.
Microsoft's article on how to run a macro:
https://support.microsoft.com/office/run-a-macro-5e855fd2-02d1-45f5-90a3-50e645fe3155
-- Diane
Give back to the Community. Help the next person who has this issue by indicating if this reply solved your problem. Click Yes or No below.