Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Logical Expression For MULTIPLE Cells???
Hello...
I am trying to use VBA (vbscript?) to perform an action if the word "Enter" does not appear within a range of 5 cells (A1:A5). I have saved the file with the word "Enter" typed in the cell, and I want the user to be forced to change the value of all 5 cells before the action is performed. I have been able to make this work using only ONE cell in the range (A1): If Worksheets("Barcode").Range("A1") = "Enter" Then (do this) Else (do that) How can I expand this statement to be true for all 5 cells? Any help would be greatly appreciated!! Cannon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Logical Expression For MULTIPLE Cells???
For Each cell In Worksheets("Barcode").Range("A1:A5")
If cell.Value = "Enter" Then (do this) Else (do that) End If Next cell -- HTH RP (remove nothere from the email address if mailing direct) wrote in message ups.com... Hello... I am trying to use VBA (vbscript?) to perform an action if the word "Enter" does not appear within a range of 5 cells (A1:A5). I have saved the file with the word "Enter" typed in the cell, and I want the user to be forced to change the value of all 5 cells before the action is performed. I have been able to make this work using only ONE cell in the range (A1): If Worksheets("Barcode").Range("A1") = "Enter" Then (do this) Else (do that) How can I expand this statement to be true for all 5 cells? Any help would be greatly appreciated!! Cannon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Logical Expression For MULTIPLE Cells???
Thanks! Works great.
Cannon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
logical expression help please | New Users to Excel | |||
Can I use more complex logical expression for sumif as creteria? | Excel Worksheet Functions | |||
How do you determine if a field is blank in a logical expression. | Excel Discussion (Misc queries) | |||
Issue with representing a blank in a logical expression. | Excel Programming | |||
How to make IF logical expression equal to any 5 digit value | Excel Programming |