Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
row number and column number of cell
I need to know in visual basic what is the row number and column number of
the cell that is used with the highest row and column number. __________________________________________________ ________________ Pierre Laporte |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
row number and column number of cell
I don't quite understand the question but
myrow=activecell.row mycol=activecell.column -- Don Guillett SalesAid Software "Pierre Laporte" wrote in message ... I need to know in visual basic what is the row number and column number of the cell that is used with the highest row and column number. __________________________________________________ ________________ Pierre Laporte |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
row number and column number of cell
Here is a function that will return the last cell as a range, you could
either break the code apart and get what you need or just use the Range.Row and Range.Column properties. Function FindLastCell() As Range Dim LastColumn As Integer Dim LastRow As Long Dim LastCell As Range If WorksheetFunction.CountA(Cells) 0 Then 'Search for any entry, by searching backwards by Rows. LastRow = Cells.Find(What:="*", After:=[A1], _ SearchOrder:=xlByRows, _ SearchDirection:=xlPrevious).Row 'Search for any entry, by searching backwards by Columns. LastColumn = Cells.Find(What:="*", After:=[A1], _ SearchOrder:=xlByColumns, _ SearchDirection:=xlPrevious).Column Set FindLastCell = Cells(LastRow, LastColumn) Else Set FindLastCell = Range("A1") End If End Function 'to use this function call it like this: Dim lCell As Range Set lCell = FindLastCell Row = lCell.Row Column = lCell.Column -- Charles Chickering "A good example is twice the value of good advice." "Pierre Laporte" wrote: I need to know in visual basic what is the row number and column number of the cell that is used with the highest row and column number. __________________________________________________ ________________ Pierre Laporte |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
row number and column number of cell
i dont want the activecell but the cell with the highest row number that has
a value "Don Guillett" wrote in message ... I don't quite understand the question but myrow=activecell.row mycol=activecell.column -- Don Guillett SalesAid Software "Pierre Laporte" wrote in message ... I need to know in visual basic what is the row number and column number of the cell that is used with the highest row and column number. __________________________________________________ ________________ Pierre Laporte |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
row number and column number of cell
or
cells(1,1).end(xldown).row -- Don Guillett SalesAid Software "Pierre Laporte" wrote in message ... i dont want the activecell but the cell with the highest row number that has a value "Don Guillett" wrote in message ... I don't quite understand the question but myrow=activecell.row mycol=activecell.column -- Don Guillett SalesAid Software "Pierre Laporte" wrote in message ... I need to know in visual basic what is the row number and column number of the cell that is used with the highest row and column number. __________________________________________________ ________________ Pierre Laporte |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Sum column A:? where ? is a number in a cell somewhere | Excel Worksheet Functions | |||
Random cell/number and dont repeat selected cell/number | Excel Discussion (Misc queries) | |||
how i write a number on a column A and see that number on letters. | Excel Worksheet Functions | |||
how do you add a new number to each cell in a column | New Users to Excel | |||
Auto number w/ different letter-number combos in same column | Excel Worksheet Functions |