ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cell number in collection (https://www.excelbanter.com/excel-programming/286277-cell-number-collection.html)

Chris Gorham[_3_]

cell number in collection
 
Hi,

I'm cycling through an object call cellcollection

Set cellCollection = Selection.SpecialCells
(xlCellTypeFormulas)

For Each cell In cellCollection

totcell = cellCollection.count
cellnow = ???
percent_done = cellnow / totcell

next cell

what's the syntax for cellnow..??

Thks

Chris


Rob van Gelder[_4_]

cell number in collection
 
cellnow = 0
For Each cell In cellCollection
cellnow = cellnow + 1
totcell = cellCollection.count
percent_done = cellnow / totcell

"Chris Gorham" wrote in message
...
Hi,

I'm cycling through an object call cellcollection

Set cellCollection = Selection.SpecialCells
(xlCellTypeFormulas)

For Each cell In cellCollection

totcell = cellCollection.count
cellnow = ???
percent_done = cellnow / totcell

next cell

what's the syntax for cellnow..??

Thks

Chris





All times are GMT +1. The time now is 09:00 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com