Thread: help
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Anders S[_2_] Anders S[_2_] is offline
external usenet poster
 
Posts: 57
Default help

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

-----

HTH
Anders Silven

"jeff" skrev i meddelandet ...
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?