Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know how to count rows:
lgLastRow = Workbooks(2).Sheets(pbFundSheetNo).Cells(Rows.Coun t, "A").End(xlUp).Row Can the same code be adapted to count the number of used columns? Thanks, Mark |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Mark,
Try: LastCol = Cells(1, Columns.Count).End(xlToLeft).Column --- Regards, Norman "Mark Stephens" wrote in message ... I know how to count rows: lgLastRow = Workbooks(2).Sheets(pbFundSheetNo).Cells(Rows.Coun t, "A").End(xlUp).Row Can the same code be adapted to count the number of used columns? Thanks, Mark |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count the number of columns on row that are not empty within a ran | Excel Discussion (Misc queries) | |||
count number of duplicates between 2 columns | Excel Discussion (Misc queries) | |||
Number of rows/columns occupied | Excel Worksheet Functions | |||
Pivot Table - How do I count number of columns? | Excel Discussion (Misc queries) | |||
Excel, how to count every 4th cell in column to see if occupied? | Excel Worksheet Functions |