Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Comparing a vba variable to a range of cells
Howdy!
I'm having some difficulty figuring out how to do the following, or even if it can be done. I've got a variable value that's a text string that is determined by user entry on a form. I need to compare that variable to a range of cells and if it appears in ANY cell in that range return a message box. The range of cells is assigned a name through the define name function. The primary problem I've got is this needs to be nested in an IF statement. This may look a little silly becuase its not a valid statement, but in essence what I need is this: IF NewCupSN1.value = Names("AllCups").ANY.value Then blah blah blah........ Any guidance would be much appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum Variable Range of Cells | Excel Programming | |||
COMPARING TEXT IN A RANGE OF CELLS AND DISPLAY IT IN ANOTHER. | Excel Worksheet Functions | |||
Using a variable for range of cells | Excel Discussion (Misc queries) | |||
Comparing a single cell to range of cells | Excel Programming | |||
Range.Select with variable cells ? | Excel Programming |