Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |