Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine the text in a range that covers several cells
I defined a name on a sheet that refers to the combined cells A1-A3. I
can set it to a text string but I can not read back what it contains. Here is a snipit of my code that sets the value and then tries to test what is stored in it. I would appreciate any help in figuring out how to get the value of this named range. Thanks Scott Sub Test() 'LName is the combined range on the worksheet of cells A1 to A3 Worksheets("Sheet1").Range("LName") = "Anderson" 'Test to see what "LName" is If Worksheets("Sheet1").Range(LName).FormulaR1C1 < "" Then MsgBox "Yes" If Worksheets("Sheet1").Range(LName).Value < "" Then MsgBox "Yes" If Worksheets("Sheet1").Range(LName).Text < "" Then MsgBox "Yes" If Worksheets("Sheet1").Range("LName").FormulaR1C1 < "" Then MsgBox "Yes" If Worksheets("Sheet1").Range("LName").Value < "" Then MsgBox "Yes" If Worksheets("Sheet1").Range("LName").Text(1) < "" Then MsgBox "Yes" End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Determine if range has NO Blank Cells without looping through each cell in range | Excel Programming | |||
Combobox to determine text for a range of cells | Excel Programming | |||
Determine whether a value is in a range of cells | Excel Discussion (Misc queries) | |||
Referencing cells that array covers | Excel Programming | |||
Expanding Gray Bar That Covers Excel Cells | Excel Programming |