![]() |
Finding a cell, selecting the one down
Everything is in the title! I have a table of unknown length, I can find it because we have a keyword as the title of this table in my sheet. I found out how to select the whole table down (using Range(Selection, Selection.End(xlDown)).Select). But my problem is really basic... I don't want to select the title, so I would like the active cell to be the one just DOWN the one I found in my sheet. Actually, my question is so basic, that I have too many answers on the forums, I just cant sort out what is what I'm looking for. Thanks in advance PS: as a generic question, is there something like -Cells.Next("direction", value).Activate- to navigate through cells? -- lonfnico ------------------------------------------------------------------------ lonfnico's Profile: http://www.excelforum.com/member.php...o&userid=33396 View this thread: http://www.excelforum.com/showthread...hreadid=532186 |
Finding a cell, selecting the one down
You can use activecell.offset(1,0) to move one cell down, from the line
you already have just put .offset(1,0) and that should do it. I try to avoid using cell.offset as it is dependant on being in the right place always! (when using the offset, the 1,0 is easy to remember by -1,0 being upwards and 1,0 being downwards, the number after the comma is left or right, plus or minus) HTH Duncan |
Finding a cell, selecting the one down
Range(Selection.offset(1,0),Selection.End(xlDown)) .Select
Offset is what refers to the next cell -- HTH Bob Phillips (remove nothere from email address if mailing direct) "lonfnico" wrote in message ... Everything is in the title! I have a table of unknown length, I can find it because we have a keyword as the title of this table in my sheet. I found out how to select the whole table down (using Range(Selection, Selection.End(xlDown)).Select). But my problem is really basic... I don't want to select the title, so I would like the active cell to be the one just DOWN the one I found in my sheet. Actually, my question is so basic, that I have too many answers on the forums, I just cant sort out what is what I'm looking for. Thanks in advance PS: as a generic question, is there something like -Cells.Next("direction", value).Activate- to navigate through cells? -- lonfnico ------------------------------------------------------------------------ lonfnico's Profile: http://www.excelforum.com/member.php...o&userid=33396 View this thread: http://www.excelforum.com/showthread...hreadid=532186 |
Finding a cell, selecting the one down
Hi, I am new at this stuff but I think this should do it.
Rgds, Ozgur Sub Find() Dim AAA As String Dim BBB As String Dim CCC As Long AAA = ActiveCell.Address BBB = Mid(AAA, 2, 1) CCC = Mid(AAA, 4, 5) Cells(CCC + 1, BBB).Select Range(Selection, Selection.End(xlDown)).Select End Sub "lonfnico" wrote: Everything is in the title! I have a table of unknown length, I can find it because we have a keyword as the title of this table in my sheet. I found out how to select the whole table down (using Range(Selection, Selection.End(xlDown)).Select). But my problem is really basic... I don't want to select the title, so I would like the active cell to be the one just DOWN the one I found in my sheet. Actually, my question is so basic, that I have too many answers on the forums, I just cant sort out what is what I'm looking for. Thanks in advance PS: as a generic question, is there something like -Cells.Next("direction", value).Activate- to navigate through cells? -- lonfnico ------------------------------------------------------------------------ lonfnico's Profile: http://www.excelforum.com/member.php...o&userid=33396 View this thread: http://www.excelforum.com/showthread...hreadid=532186 |
Finding a cell, selecting the one down
Sorry, when I typed that I didnt give you the line
ActiveCell.Offset(1, 0).Range("A1").Select That will move one cell downwards, I keep a little slip of paper saying -1,-1 = up and left, 1,1 = down and right. Just to help me remember which way goes where! HTH Duncan |
Finding a cell, selecting the one down
Thanks, will try that after lunch! Ill let you know how I made it Nic -- lonfnic ----------------------------------------------------------------------- lonfnico's Profile: http://www.excelforum.com/member.php...fo&userid=3339 View this thread: http://www.excelforum.com/showthread.php?threadid=53218 |
All times are GMT +1. The time now is 11:07 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com