Don Guillett wrote:
how about something like this
for each ws in worksheets
for each c in range("a167:a450")
if c=167 and c<=450 then c.value=c-1
next c
next ws
--
Don Guillett
SalesAid Software
"ThatGirlinMS" wrote in message
oups.com...
I have a workbook with serveral sheets that has numbers formatted as
'General' throughout in varying places. The worksheets are of no
specific width or length.
I need to loop through all sheets looking for cells containing data
within a range (ex. 167 - 450) and change to numbers (ex subtract one
from the value)
any ideas? I thought there has to be a better way than looping through
EVERY cell in EVERY sheet.
(= 167 and <= 450) = (value - 1)
Thanks!
Nope, that's not the solution to my question. I have to look at EVERY
cell in EVERY sheet. Then I have to see if the value in that cell is
between a couple of values (ex. 167 - 450) and perform an action
accordingly (ex subtract one from the value). I have a
Selection.SpecialCells(xlCellTypeConstants).Select which selects all
cells with a constant value within. Is there a way to loop through
every cell in the selection?