LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 106
Default CODE given - Highlighting corresponding cells

Hello all,

I have a simple set like this:

A B C D E F ----- rng3
1.1 1 1 1 0 0 3
1.2 1 0 0 1 0 2
1.3 1 0 0 0 0 1
2.1 0 1 1 1 1 4
2.2 1 1 1 1 1 5
Rank 2 5 1 6 3 4 ----- rng1d

Assuming that letters A, C and D are highlighted (colorindex = 3), I
want to transform the same pattern to the corresponding cells in the
row starting with Rank. To achieve this I have written a code like
this:

Set rng1c = Sheet1.Columns(1).Find( _
What:="Rank", _
After:=Cells(Rows.Count, 1), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)

Set rng1d = rng1c.EntireRow

' rng1d.Interior.ColorIndex = 3 --- this highlights the entire row
starting with 'Rank'

But, I want the corresponding cells in the rng1d to be highlighted
according to the cells that have been highlighted in rng3.

For example:

1. As we have assumed that A, C and D have been highlighted, the values
2,1,6 have to be highlighted in rng 1d respectively.

2. If we assume B, D and E is highlighted, the values 5,6,3 have to be
highlighted in rng 1d respectively.

I tried a code like this.. It doesnt work for some reason..

rng1d.Cells.Interior.ColorIndex = rng3.Cells.Interior.ColorIndex

I would deeply appreciate any help for this.

Thanks,
Thulasiram

 
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
Highlighting cells Rich Blanchard New Users to Excel 0 December 8th 10 03:50 PM
How do I add cells by highlighting them? Tim Excel Discussion (Misc queries) 2 September 7th 09 10:22 PM
Highlighting cells Martin Murray Excel Worksheet Functions 2 April 12th 08 04:07 AM
highlighting cells Candace Excel Discussion (Misc queries) 1 November 2nd 06 06:46 PM
Highlighting blanks via GO TO SPECIAL is not highlighting blank cells - HELP, I'm totally stuck. Jamie Furlong Excel Discussion (Misc queries) 6 August 28th 05 09:27 PM


All times are GMT +1. The time now is 06:11 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"