I've spent 4+ hours trying to figure this out without success.
Simple Record Macro works:
But I can't get figure out how to revise the code into a dynamic range. I've tried several versions, for simplicity I've only included one non-working example of what I've tried.
As always
TIA
And may everyone in the US enjoy their 4th!
Ron
Simple Record Macro works:
Code:
ActiveCell.FormulaR1C1 ="=""Cards issued this week ["" & COUNTIF(R[1]C:R[15648],""Yes"") & ""]"" "
But I can't get figure out how to revise the code into a dynamic range. I've tried several versions, for simplicity I've only included one non-working example of what I've tried.
Code:
Dim LastRow As Long
Dim LastCol As Integer
Dim thiswksht As Worksheet
Dim thiswb As Workbook
'
'
With thiswksht
LastRow = Cells(Cells.Rows.Count, "A").End(xlUp).Row
LastCol = Cells(1, Columns.Count).End(xlToLeft).Column
End With
'
'code to get me to this point
' now insert a column and select row 1 cell in the new column.
ActiveCell.EntireColumn.Offset(0, 1).Insert
ActiveCell.Offset(0, 1).Select
'
'count all the "yes'" from row two to the last row
' the next line works but I need to count to the last row
'ActiveCell.FormulaR1C1 ="=""Cards issued this week ["" & COUNTIF(R[1]C:R[15648],""Yes"") & ""]"" "
'ActiveCell.FormulaR1C1 = "= ""["" & COUNTIF(ActiveCell.Offset(1, 0), LastRow),""Yes"") & ""] Cards Issued This Week"" "
As always
TIA
And may everyone in the US enjoy their 4th!
Ron