LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine if range has NO Blank Cells without looping through each cell in range Excelenator[_29_] Excel Programming 4 August 4th 06 06:30 AM
Combobox to determine text for a range of cells Robbyn Excel Programming 0 June 26th 06 03:18 PM
Determine whether a value is in a range of cells Carl Excel Discussion (Misc queries) 2 December 12th 05 12:23 AM
Referencing cells that array covers mayre Excel Programming 1 September 28th 05 03:00 PM
Expanding Gray Bar That Covers Excel Cells [email protected][_2_] Excel Programming 0 January 18th 05 02:24 PM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"