Timeline for Excel VBA Hide Rows based on cell color and if command says "Yes"
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 9, 2017 at 21:07 | comment | added | user3598756 | You can add Application.ScreenUpdating=False at the beginning if the sub and Application.ScreenUpdating=True right before its end. | |
| Mar 9, 2017 at 18:51 | comment | added | Eva | Hi! I am running this code and it works perfectly but I noticed that the page kind of spazzes out as it refreshes while searching for all of the weekends. Is there anyway to get it to hide all of the weekends in one fell swoop or is it required to go down through each row and glitch as it checks it? | |
| Mar 9, 2017 at 18:50 | vote | accept | Eva | ||
| Mar 6, 2017 at 20:24 | comment | added | Eva | There are 21 non empty cells and its formatted as a table so I can constantly add new dates. I should clarify: There are 5 tables total, one for each district. But the color of the cells carries over so the whole row hiding formula will affect the other 5 districts along with the first district. | |
| Mar 6, 2017 at 18:16 | comment | added | Eva | Okay, I understand now and I pasted the code in the correct places. So, the code automatically runs whenever I change Q3; however, it still only hides the first colored row. | |
| Mar 6, 2017 at 17:34 | comment | added | user3598756 | you have to follow the "instructions" I gave you: the 2nd code must be put in your relevant worksheet code pane (not in a standard module) and have each changing of its Q3 cell trigger the macro. Step through your code to see it's really like that | |
| Mar 6, 2017 at 16:24 | comment | added | Eva | No worries, I wanted to make sure that it wasn't something that I had some wrong. I added the changes and it still only hides one row and I still have to manually run the macro. Any ideas why this isn't changing when I changed the code? | |
| Mar 6, 2017 at 15:09 | comment | added | user3598756 | Sorry, I erroneously type Worksheet_SelectionChange instead of Worksheet_Change(). And missed a .Row. See edited code. let me know | |
| Mar 6, 2017 at 15:08 | history | edited | user3598756 | CC BY-SA 3.0 | deleted 9 characters in body |
| Mar 6, 2017 at 15:03 | comment | added | Eva | I would love to tell you if this code worked out; however, when I entered it into the module and pressed Run, it started but now it won't stop. VBE is constantly running and the excel book itself is constantly saying Calculate in the bottom left corner. I can't select or edit any cells while this is happening. I ran this while Q3 said "Yes" but I don't know if that caused this. | |
| Mar 6, 2017 at 14:47 | history | answered | user3598756 | CC BY-SA 3.0 |