Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Nathan
Try this Sub FindLastColumn() Dim rFound As Range Set rFound = Sheet1.Cells.Find("*", Sheet1.Cells(1, 1), , , xlByColumns, xlPrevious) rFound.Offset(0, 1).Resize(1, 2).EntireColumn.Select End Sub -- Dick Kusleika Excel MVP Daily Dose of Excel www.dicks-blog.com Nathan Bell wrote: All, I am trying to determine the code to select the 2 last empty columns in Excel via VBA. The only code I can find is Range("IV5").End(xlToLeft).Select the only reason for that is row 5 contains data and 1-4 don't, thus returning results further left than I wanted when doing a paste. Again I am trying to select the last 2 empty columns in a worksheet. What would be the most effective way to do this? Regards, Nathan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need Help Quick | Excel Discussion (Misc queries) | |||
NEED HELP QUICK! | Excel Worksheet Functions | |||
Real Newbie newbie question | New Users to Excel | |||
Help quick | Excel Worksheet Functions | |||
Hi! I need some quick help! | Excel Discussion (Misc queries) |