I can not figure out a multiple count if macro. Basically i want it to search a column (read d2:d3000) and find a set of letters such as "CB", "KP2" and throw out all the counts. I tried to record the macro then put multiple lines in but this did not work. can someone assist?
below is my example
Sub WeeklyCountIfs()
'
' WeeklyCountIfs Macro
'
'
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""CB"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PRT"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""CCC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""DEM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""DEL"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KGD"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""RC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""RW"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PH"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KPH"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KCC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KDM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KDL"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""UGD"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KRC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM1"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM2"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KPM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KP2"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KP1"")"
End Sub
below is my example
Sub WeeklyCountIfs()
'
' WeeklyCountIfs Macro
'
'
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""CB"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PRT"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""CCC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""DEM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""DEL"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KGD"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""RC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""RW"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PH"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KPH"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KCC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KDM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KDL"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""UGD"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KRC"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM1"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""PM2"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KPM"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KP2"")"
ActiveCell.FormulaR1C1 = "=COUNTIF(R[-2009]C4:R[989]C4,""KP1"")"
End Sub