I'm attempting to build a central report that summarizes data from several other reports. Catch is that this central report will occasionally need to be manually overwritten by the user...and the user will add a comment to any cell this is done on. So the update script will need to update the cell's contents IF no comment is present...since we don't want to overwrite someone's manual change.
With help, I got this this for a single column in the report:
Sub SkipCommentedCells()
Dim R As Range, Rskip As Range
Dim DailyCount As Single
Set R = ActiveSheet.Range("=Table_ExternalData_1[1.1 Daily Count (5)]")
On Error Resume Next
For Each C In R.SpecialCells(xlCellTypeComments)
If Err.Number = 0 Then
If Rskip Is Nothing Then
Set Rskip = C
Else
Set Rskip = Union(C, Rskip)
End If
Else
End If
Next C
For Each C In R
If Intersect(C, Rskip) Is Nothing Then
DailyCount = WorksheetFunction.VLookup(Worksheets("RawScorecard").Cells(C.Row, 5), Worksheets("RawScorecardData").Range("D:H"), 5, 0)
If DailyCount < 0.9 Then
C.Value = 0
Else
C.Value = 5
End If
C.ClearComments
End If
Next C
End Sub
And this works great for updating that one column. Now I'd like to expand this to update all of the other columns (K through Z in my example below, as well as the RawScorecardData sheet that will pull info from other reports) and I'm not sure what the best way to go about it is. Each column will have it's own function for an update. I think I would need to declare columns K through Z as an Array, then loop through that array with the different update formulas, but I'm really not sure how to go about it.
Can anyone help me out with a template that can get me going?
Here is the file I'm working with:
box (dot) com/s/98be424694f843e8f2f3
Bookmarks