Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find first cell in range 2

Status
Not open for further replies.

RonRepp

Technical User
Feb 25, 2005
1,031
US
Hi all:

I need to find the first cell in a named range.

I can find the last one, but not the first one using xlCellTypeLastCell.

Any help will be greatly appreciated.

Thanks,


Ron Repp

If gray hair is a sign of wisdom, then I'm a genius.

My newest novel: Wooden Warriors
 
A starting point:
MsgBox Split(Range("NamedRange").Address(false,false), ":")(0)

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 



Hi,
Code:
FirstValue = Range("YourNamedRange)(1).value
FirstValue = Range("YourNamedRange).cells(1,1).value
dim r as range
for each r in Range("YourNamedRange)
   FirstValue = r.value
   exit for
next
with Range("YourNamedRange)
   FirstRow = .row
   FirstCol = .column
   FirstValue = cells(FirstRow, FirstCol).value 
end with



Skip,

[glasses]Have you heard that the roundest knight at King Arthur's round table was...
Sir Cumference![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top