View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mark Stephens[_3_] Mark Stephens[_3_] is offline
external usenet poster
 
Posts: 15
Default how to count the number of occupied columns in a sheet?

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