![]() |
Or in a macro?
Is there a way to use an or type statement in a macro? For example I'm using
an event macro on 8 cells. If one of those cells = No a row is unhidden, this works fine, the problem I'm running into, is that I want to have the row hidden if the all of those cells = yes or is blank. Is there an or statement I can use or do I need to do a bunch of if statements, or am I just missing something very obvious? Thanks |
Or in a macro?
hi.
Post your current code. Regards FSt1 "Vick" wrote: Is there a way to use an or type statement in a macro? For example I'm using an event macro on 8 cells. If one of those cells = No a row is unhidden, this works fine, the problem I'm running into, is that I want to have the row hidden if the all of those cells = yes or is blank. Is there an or statement I can use or do I need to do a bunch of if statements, or am I just missing something very obvious? Thanks |
Or in a macro?
Possibly something like this:
If WorksheetFunction.CountIf(Range("A1:H1"), "No") 0 _ Then 'Code if "No" exists Else 'Code if "No" does not exist End If HTH, Paul "Vick" wrote in message ... Is there a way to use an or type statement in a macro? For example I'm using an event macro on 8 cells. If one of those cells = No a row is unhidden, this works fine, the problem I'm running into, is that I want to have the row hidden if the all of those cells = yes or is blank. Is there an or statement I can use or do I need to do a bunch of if statements, or am I just missing something very obvious? Thanks |
All times are GMT +1. The time now is 04:38 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com