PC Review


Reply
 
 
=?Utf-8?B?Z2VlYmVl?=
Guest
Posts: n/a
 
      26th Feb 2007
hi,

I have a sheet withi like 500 or so rows. There is a column B with some of
the values in Bold. I would like to add a column to the sheet which puts a
"BOLD" in each row/column if the value in column B is bolded, and a value of
"NOT" if it is not bolded. Is there a programmatic/fast way of doing this?

Thanks in advance,
geebee

 
Reply With Quote
 
 
 
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      26th Feb 2007
Sub boldchk()
n = Cells(Rows.Count, 2).End(xlUp).Row
Range("C1").EntireColumn.Insert
For i = 1 To n
If Cells(i, 2).Font.Bold = True Then
Cells(i, 3).Value = "BOLD"
Else
Cells(i, 3).Value = "NOT"
End If
Next
End Sub
--
Gary''s Student
gsnu200708


"geebee" wrote:

> hi,
>
> I have a sheet withi like 500 or so rows. There is a column B with some of
> the values in Bold. I would like to add a column to the sheet which puts a
> "BOLD" in each row/column if the value in column B is bolded, and a value of
> "NOT" if it is not bolded. Is there a programmatic/fast way of doing this?
>
> Thanks in advance,
> geebee
>

 
Reply With Quote
 
merjet
Guest
Posts: n/a
 
      26th Feb 2007
Sub macro1()
Dim c As Range
Dim rng As Range

Set rng = Sheets("Sheet1").Range("B1:B500")
For Each c In rng
If c.Font.FontStyle = "Bold" Then
Sheets("Sheet1").Range("H" & c.Row) = "BOLD"
Else
Sheets("Sheet1").Range("H" & c.Row) = "NOT"
End If
Next c
End Sub

Change row numbers and columns to suit.

Hth,
Merjet


 
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
Calendar Spreadsheet: Column 1 = Date, Column 2 Time of Day, Column 3 memo text field JDJ Microsoft Excel Discussion 0 24th May 2007 01:14 AM
Search for a column based on the column header and then past data from it to another column in another workbook minkokiss Microsoft Excel Programming 2 5th Apr 2007 01:12 AM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Programming 2 30th Dec 2006 06:23 PM
Based on a condition in one column, search for a year in another column, and display data from another column in the same row >> look MPSingley@midamerican.com Microsoft Excel Misc 0 27th Dec 2006 04:31 PM
How can i have all alike product codes in column A be matched with like cities in column B and then add the totals that are in column C genesisoxygen@gmail.com Microsoft Excel Programming 4 2nd Aug 2006 01:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:35 PM.