Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
columns and rows labeled the same (cell 1-1 vs a-1) how do I chang | Excel Discussion (Misc queries) | |||
Identify the row in which a MAX number in a column resides | Excel Worksheet Functions | |||
VLOOKUP when a range resides in Column A | Excel Discussion (Misc queries) | |||
VBA to find account number that resides in one of several files | Excel Programming | |||
VBA - Open Folder Where .xls Resides | Excel Programming |