sassriverrat
Well-known Member
- Joined
- Oct 4, 2018
- Messages
- 655
Quick question-
How would I go about dim'ing "eqat"? I believe I've got everything else correct. This adds N12 from each sheet named "Noon#"
How would I go about dim'ing "eqat"? I believe I've got everything else correct. This adds N12 from each sheet named "Noon#"
Code:
Dim WS_Count As Integer
Dim i As Integer
WS_Count = ActiveWorkbook.Worksheets.Count
Eqat = "="
nooncnt = 0
For i = 1 To WS_Count
Tname = ActiveWorkbook.Worksheets(i).name
If Left(Tname, 4) - "Noon" Then
Eqat = Eqat & "+" & "Noon" & "!N12"
nooncnt = nooncnt + 1
End If
Next i
If nooncnt > 0 Then
ActiveCell.Formula = Eqat + Range("R17")
End If