New member on vbaexpress here. I'm having issue with getting my vba code to run correctly...here is my problem:
What I'm trying to do here is hide certain rows in excel based on different conditions. I have a vlookup in excel which returns a number from 1 to 9. Based on different conditions that are met, it will return a number indicating which rows are needed to hide.
In my vba code, I have a case for each of the numbers 1 to 9, along with the commands to hide the necessary rows. The vlookup in excel seems to be working fine, and the number will change when different conditions are met. The problem I'm having is that when the number changes, it seems that this is not being picked up in the vba code. It will not hide the correct rows after the number has changed. However, if I go to excel and manually type in a different number, the macro will run correctly and hide the correct rows.
I'm not sure if this has made any sense so far. What I'm wondering is if there is a way to add code that will recognize when the number has changed and hide the associate rows for that number?
Thank you in advance and I apologize if this is not very clear.