count function question

  • Thread starter Thread starter Alan M
  • Start date Start date
A

Alan M

I am using the following code to count the values in column
B but want to place the total in bold font in another column.

How can I do this please?

For Each myArea In Range("B:B").SpecialCells(xlCellTypeConstants).Areas
With myArea.Cells(myArea.Cells.Count + 1)
.Formula = "=Count(" & myArea.Address & ")"
.Font.Bold = True
End With
Next myArea
 
Sub wehd()
For Each myArea In Range("B:B").SpecialCells(xlCellTypeConstants).Areas
With myArea.Cells(myArea.Cells.Count).Offset(1, 1)
.Formula = "=Count(" & myArea.Address & ")"
.Font.Bold = True
End With
Next myArea
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top