PC Review


Reply
Thread Tools Rate Thread

count function question

 
 
Alan M
Guest
Posts: n/a
 
      2nd Mar 2008

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

 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      2nd Mar 2008
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


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

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RE: A question about the Count/CountIf function =?Utf-8?B?TWFydGluIEZpc2hsb2Nr?= Microsoft Excel Worksheet Functions 0 12th Jan 2007 09:10 AM
Re: A question about the Count/CountIf function Roger Govier Microsoft Excel Worksheet Functions 0 12th Jan 2007 08:55 AM
count function question =?Utf-8?B?bHlubiBhdGtpbnNvbg==?= Microsoft Access Reports 1 24th Nov 2005 02:35 PM
Count function question John Microsoft Excel Worksheet Functions 1 29th Nov 2004 10:23 PM
Count function question pow67 Microsoft Access 4 8th Aug 2003 08:20 PM


Features
 

Advertising
 

Newsgroups
 


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