Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So, you can use the formula in the subject line (Cells(Rows.Count,
"b").End(xlUp).Row) to select the last cell in the column. But, I have a table with a variable number of rows, which will most likely be empty. So instead of selecting the last cell with a value in it, I want to select hte last cell with a border around it. How? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Will this work for you? Sub LastBorder() Dim myCell As String Range("B:B").Select '<===You can change this to whatever range you want For Each cell In Selection If cell.Borders(xlEdgeBottom).LineStyle = xlNone Then GoTo fin End If myCell = cell.Address Next cell fin: If myCell < "" Then Range(myCell).Select Else Range("B1").Select End If End Sub -- Ikaabod ------------------------------------------------------------------------ Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371 View this thread: http://www.excelforum.com/showthread...hreadid=545352 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count cells that contain "Y" in columnA IF contains"X" in columnB | Excel Worksheet Functions | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel | |||
inalRow = Range("A65536").End(xlUp).Row | Excel Programming | |||
S1.Range("D65536").End(xlUp).Select | Excel Programming | |||
Question about "End(xlUp)" property | Excel Programming |