help

  • Thread starter Thread starter jeff
  • Start date Start date
J

jeff

Anyone konw how to do the following:
I have a row of cells each containing a whole number
value that must be decreased by 1 on a daily basis. I
want to assign a macro to a button that when clicked,
will subtract a value of one from each indivdual cell
that it is included in a group of highlighted cells.

Can this be done?
 
Jeff,

-----

Sub test593()
Dim cCell As Range
For Each cCell In Selection.Cells
If IsEmpty(cCell.Value) = True Then GoTo nextCell
If IsNumeric(cCell.Value) = False Then GoTo nextCell
cCell.Value = cCell.Value - 1
nextCell:
Next
End Sub
 
Back
Top