Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default count non bolded items

Is it possible to write a macro on the above subject line .. and insert
blank row in A1 so as to put in the result?


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default count non bolded items

Annette,

Here is one way.

Dim i As Long
Dim cLastRow As Long
Dim cNonBold As Long

cLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To cLastRow
If Not Cells(i, "A").Font.Bold Then
cNonBold = cNonBold + 1
End If
Next i
Range("A1").EntireRow.Insert
Range("A1").Value = "Num non-bold cells = " & cNonBold

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Annette" wrote in message
...
Is it possible to write a macro on the above subject line .. and insert
blank row in A1 so as to put in the result?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default count non bolded items

This is just too clever ... thank you!

"Bob Phillips" wrote in message
...
Annette,

Here is one way.

Dim i As Long
Dim cLastRow As Long
Dim cNonBold As Long

cLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = 1 To cLastRow
If Not Cells(i, "A").Font.Bold Then
cNonBold = cNonBold + 1
End If
Next i
Range("A1").EntireRow.Insert
Range("A1").Value = "Num non-bold cells = " & cNonBold

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Annette" wrote in message
...
Is it possible to write a macro on the above subject line .. and insert
blank row in A1 so as to put in the result?






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT to count items with duplicates where another column contains two defined items PCLIVE Excel Worksheet Functions 4 September 8th 07 10:33 AM
Formula to Add only the BOLDED numbers in a column. Rich D Excel Discussion (Misc queries) 11 December 10th 06 03:01 PM
Bolded Text To Column henrikb Excel Worksheet Functions 0 March 20th 06 01:35 PM
the sum of all bolded numbers Sam12345 Excel Worksheet Functions 5 November 21st 05 03:20 AM
how to sort list, bolded items from no bolded? tcd50 Excel Discussion (Misc queries) 1 July 9th 05 10:29 PM


All times are GMT +1. The time now is 03:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"