Forum Discussion
Using a macro to apply two different conditional formatting functions to same table
I see that the previewed document appears like what I am after, but again after running the macro it only applied formatting to Columns A-D and not E.
That's surprising because i am running Excel 2013 as well and the macro works as intended in my spreadsheet as you can see in the attached file. In which line of the code does the error appear in your sheet and can you attach your file without sensitive data? This could be helpful to determine why it's not working in your spreadsheet.
- kennyb21167Jan 22, 2022Copper Contributor
Sorry for the delayed reply. So I'm not quite sure where the error is occurring but I've attached a screenshot of what is happening and so you can see that only half of the macro is functioning on my end.
I have also reattached your example document after I have run/saved the macro and as you can see in worksheet 2 the macro did not run correctly.
- OliverScheurichJan 24, 2022Gold Contributor
Sorry for the delayed reply. Unfortunately i can't imagine why the code doesn't work properly on your PC especially as i work with Excel 2013 as well and i assume that we both work with Windows10. There have been posts concerning Runtime error 5 in the Microsoft Tech Community. Maybe you can find a reason for the invalid procedure call or argument error or you want to post a question regarding this error message.
Alternatively you could record the macro yourself. This might be the easiest way to solve this error.