Hello,
I have this code that counts the # of occupied cells and inputs the count into an empty cell in column F.
Sub CountOccupiedCells()
Dim nRow As Long
Dim nCol As Long
Dim nCount As Long
For nRow = 2 To ActiveSheet.UsedRange.Rows.Count
For nCol = 1 To ActiveSheet.UsedRange.Columns.Count
If Not IsEmpty(Cells(nRow, nCol)) Then nCount = nCount + 1
Next nCol
Next nRow
Range("F" & Cells(Rows.Count, "F").End(xlUp).Row + 1) = nCount
End Sub
How do i change this so that the macros puts the count total in cell F3 everytime (even if it has to overwrite the last total it counted).
I want it to do this because the occupied cells its counting could increase, and I want only 1 updated total to appear when i run the macros after i've added more entries. Because right now it puts the new total under the last total.
thanks!
Bookmarks