Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Determining Row in Which Labeled Cell Resides

Excel 2003. I have a cell labeled "SEH." I want to be able to determine in
which row of the spreadsheet this Cell resides and to use that number
programmatically. This row is not in a fixed position (as my code inserts a
variable number of rows above this row). How may I get this labeled cell's
row number? Thanks and God bless for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Determining Row in Which Labeled Cell Resides

Sub SEHrow()
Dim rFound As Range
Set rFound = ActiveSheet.UsedRange.Find("SEH", , , xlWhole)
If rFound Is Nothing Then
MsgBox "Not Found"
Else
MsgBox "Found at Row #" & rFound.Row & _
" Column #" & rFound.Column
End If
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have a cell labeled "SEH." I want to be able to determine
in
which row of the spreadsheet this Cell resides and to use that number
programmatically. This row is not in a fixed position (as my code inserts
a
variable number of rows above this row). How may I get this labeled
cell's
row number? Thanks and God bless for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Determining Row in Which Labeled Cell Resides

Dear Ardus:

What if I used:

Range("SEH").Select
I = Range.Row

I have tried this but Range.Row gives an error.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Ardus Petus" wrote:

Sub SEHrow()
Dim rFound As Range
Set rFound = ActiveSheet.UsedRange.Find("SEH", , , xlWhole)
If rFound Is Nothing Then
MsgBox "Not Found"
Else
MsgBox "Found at Row #" & rFound.Row & _
" Column #" & rFound.Column
End If
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have a cell labeled "SEH." I want to be able to determine
in
which row of the spreadsheet this Cell resides and to use that number
programmatically. This row is not in a fixed position (as my code inserts
a
variable number of rows above this row). How may I get this labeled
cell's
row number? Thanks and God bless for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 127
Default Determining Row in Which Labeled Cell Resides

Better yet, this works

SEStart = ThisWorkbook.ActiveSheet.Range("SEH").Row

Thanks

--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org


"Ardus Petus" wrote:

Sub SEHrow()
Dim rFound As Range
Set rFound = ActiveSheet.UsedRange.Find("SEH", , , xlWhole)
If rFound Is Nothing Then
MsgBox "Not Found"
Else
MsgBox "Found at Row #" & rFound.Row & _
" Column #" & rFound.Column
End If
End Sub

HTH
--
AP

"Chaplain Doug" a écrit dans le
message de news: ...
Excel 2003. I have a cell labeled "SEH." I want to be able to determine
in
which row of the spreadsheet this Cell resides and to use that number
programmatically. This row is not in a fixed position (as my code inserts
a
variable number of rows above this row). How may I get this labeled
cell's
row number? Thanks and God bless for the help.
--
Dr. Doug Pruiett
Good News Jail & Prison Ministry
www.goodnewsjail.org



Reply
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
columns and rows labeled the same (cell 1-1 vs a-1) how do I chang Wendy Excel Discussion (Misc queries) 7 February 13th 09 07:08 PM
Identify the row in which a MAX number in a column resides BarDoomed Excel Worksheet Functions 7 June 5th 08 08:23 PM
VLOOKUP when a range resides in Column A rpalarea Excel Discussion (Misc queries) 1 June 19th 07 08:40 PM
VBA to find account number that resides in one of several files JEFF Excel Programming 20 November 17th 05 09:37 PM
VBA - Open Folder Where .xls Resides ajocius[_29_] Excel Programming 5 September 25th 05 05:16 PM


All times are GMT +1. The time now is 11:32 PM.

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

About Us

"It's about Microsoft Excel"