Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
C C is offline
external usenet poster
 
Posts: 61
Default Fill with Gray if Column b is bold

My spreadsheet contains data from column A1 to K?. There may be 10 rows or
1000 rows. I need to look at column B and if it the font is bold then I need
to fill A:K with gray. Can someone help?

Thanks in advance,

CB
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 181
Default Fill with Gray if Column b is bold

I don't think you can but it might be worth taking a step back and looking at
how column B is populated. What is entered? How does it get there? What
makes it format bold? If it's not manual input where does the data come from
and is there anything else that can differentiate what can and can't be
conditionally formatted?

--
Russell Dawson
Excel Student

Please hit "Yes" if this post was helpful.


"C" wrote:

My spreadsheet contains data from column A1 to K?. There may be 10 rows or
1000 rows. I need to look at column B and if it the font is bold then I need
to fill A:K with gray. Can someone help?

Thanks in advance,

CB

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Fill with Gray if Column b is bold

Sub fill_gray()
Dim rng As Range
Dim c As Range
Set rng = ActiveSheet.Range(Cells(1, 2), _
Cells(Rows.Count, 2).End(xlUp))
For Each c In rng
If c.Font.Bold = True Then
Range("A" & c.Row & ":K" & c.Row).Interior.ColorIndex = 15
Else
Range("A" & c.Row & ":K" & c.Row).Interior.ColorIndex = xlNone
End If
Next c
End Sub


Gord Dibben MS Excel MVP

On Mon, 15 Mar 2010 09:06:01 -0700, C wrote:

My spreadsheet contains data from column A1 to K?. There may be 10 rows or
1000 rows. I need to look at column B and if it the font is bold then I need
to fill A:K with gray. Can someone help?

Thanks in advance,

CB


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
How can I sum numbers that have a gray color-fill in cell? ScottD Excel Discussion (Misc queries) 1 October 6th 08 04:14 PM
If date in column T is +7 then column C is Bold Red writerman Excel Discussion (Misc queries) 0 March 28th 07 03:03 AM
If date in column T is +7 then column C is Bold Red Max Excel Discussion (Misc queries) 0 March 27th 07 11:32 PM
What are the gray areas outside row and column identifiers? Kim Excel Discussion (Misc queries) 3 December 28th 06 07:17 PM
Auto BOLD max value in a column gevans Excel Worksheet Functions 2 March 6th 06 08:34 PM


All times are GMT +1. The time now is 03:49 PM.

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

About Us

"It's about Microsoft Excel"