- Joined
- Jan 19, 2011
- Messages
- 2
- Reaction score
- 0
I am new to macros. I have a excel spreadsheet for technical assistance. There are sheets for various sites and there is a summary sheet. There are columns asking for the date of request and the date of resolution. If there is a date of request and a date of resolution it means the issue was solved but if there is no date of resolution it means the issue was not resolved. The total number of resolved and unresolved have to be then entered in the summary sheet. I have this macro so far but I keep getting out of range error. Please help.
Sub Macro()
Dim R As Long
Dim S As Long
Sheets("Sheet2").Range("C9").Activate
If IsDate(Cell) = True Then
ActiveCell.Offset(0, 1).Select
If IsDate(Cell) = True Then
R = R + 1 'resolved issues
Else
S = S + 1 'unresolved issues
End If
End If
Sheets("Summary").Range("B9").Activate 'go to first sheet
Range("B9").Value = R
Range("B10").Value = S
ActiveWorkbook.Save
End Sub
Sub Macro()
Dim R As Long
Dim S As Long
Sheets("Sheet2").Range("C9").Activate
If IsDate(Cell) = True Then
ActiveCell.Offset(0, 1).Select
If IsDate(Cell) = True Then
R = R + 1 'resolved issues
Else
S = S + 1 'unresolved issues
End If
End If
Sheets("Summary").Range("B9").Activate 'go to first sheet
Range("B9").Value = R
Range("B10").Value = S
ActiveWorkbook.Save
End Sub