ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   count function question (https://www.excelbanter.com/excel-programming/406979-count-function-question.html)

Alan M

count function question
 

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).Are as
With myArea.Cells(myArea.Cells.Count + 1)
.Formula = "=Count(" & myArea.Address & ")"
.Font.Bold = True
End With
Next myArea


JLGWhiz

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


"Alan M" wrote:


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).Are as
With myArea.Cells(myArea.Cells.Count + 1)
.Formula = "=Count(" & myArea.Address & ")"
.Font.Bold = True
End With
Next myArea



All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com