Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() How can I get the last used column in a sheet??? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There's an example on the "Last Row/Col in Worksheet" page on my website
-- Rob van Gelder - http://www.vangelder.co.nz/excel "monika" wrote in message ... How can I get the last used column in a sheet??? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One might use the UsedRange property of the worksheet.
This is the range that has been used, but is only refreshed on saving & re-opening. It is useful though. The UsedRange has two properties. Columns.Count and Rows.Count that return the UsedRange width and height...ie columns and rows. BUT you need to know where the UsedRange starts, so you'll need the Column and Row values too. So, on a spreadsheet... With Activesheet.usedRange LastRowUsed = .Row + .Rows.Count -1 LastColumnUsed = .Column +.Columns.Count -1 End With Patrick Molloy Microsoft Excel MVP -----Original Message----- How can I get the last used column in a sheet??? . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Compare sheet 1 column A numbers with sheet 2 column A number | Excel Worksheet Functions | |||
Ron DeBruin Macro - Moving Sheet Name from Last Column to Column A | Excel Worksheet Functions | |||
Dynamic column chart - copying from Sheet to Sheet. | Excel Discussion (Misc queries) | |||
Dynamic column chart - copying from Sheet to Sheet. | Charts and Charting in Excel | |||
Compare Sheet Cell to Sheet Column | Excel Worksheet Functions |