Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,101
Default High Lighting cells

This is what i have & it works it is high lighting B cells column now i want
to
high light AH cells column at the same time & from there i need to do rows
43 to 74 ,80 to 111,117 to 148,154 to 185,191 to 222, 228 to 259 also in the
same
manner also B & AH columns have a conditional colour format red green or
yellow when these colours are in place it will not high light i believe if
you or someone can make this happen YOU MUST BE A GOD


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim K As Integer
i = 2
j = 6
K = ActiveCell.Column()
Set Data = Range("B6:AH37")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 6 Or ActiveCell.Row 37 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 54 Then
Exit Sub
End If

ActiveCell.Offset(0, -(K - i)). _
Resize(1).Interior.ColorIndex = 40

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 96
Default High Lighting cells

Please make only one posting of your question in the discussion group of your
choice.

"Mike" wrote:

This is what i have & it works it is high lighting B cells column now i want
to
high light AH cells column at the same time & from there i need to do rows
43 to 74 ,80 to 111,117 to 148,154 to 185,191 to 222, 228 to 259 also in the
same
manner also B & AH columns have a conditional colour format red green or
yellow when these colours are in place it will not high light i believe if
you or someone can make this happen YOU MUST BE A GOD


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim K As Integer
i = 2
j = 6
K = ActiveCell.Column()
Set Data = Range("B6:AH37")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 6 Or ActiveCell.Row 37 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 54 Then
Exit Sub
End If

ActiveCell.Offset(0, -(K - i)). _
Resize(1).Interior.ColorIndex = 40

End Sub


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 698
Default High Lighting cells

Hey Mike,

Seems you are all over the groups. See my recent post to your reply to my
first reply of your orignal post in Misc.

Gheezzz, I'm getting confuzzzed now. It's best to stay with the original
thread to build on the solution. (A newsgroup protocol!)

In case you are having trouble navigating the newsgroups, this is my latest
solution attempt, posted to Misc.

Hi Mike,

Try this which highlights the column B and AH cell of activecell row within
("B6:AH37").

The activecell column rows 43 to 74 and 80 to 111 are highlighted also.
(You can probably add the other four ranges you want highlighted by adding
additional lines of code and changing the offset value for each.)

Don't know what to tell you about the conditional format coloring. In my
tests the CF coloring will prevail over the VBA code coloring.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim RowData As Range
Dim i As Integer
Dim j As Integer
Dim k As Integer
Dim m As Integer
Dim l As Integer
i = 2
j = 34
m = 37

k = ActiveCell.Column()
l = ActiveCell.Row()

Set Data = Range("B6:AH37")
Set RowData = Range("B38:ah300")
Data.Interior.ColorIndex = xlNone
RowData.Interior.ColorIndex = xlNone

If ActiveCell.Row < 6 Or ActiveCell.Row 37 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 34 Then
Exit Sub
End If

ActiveCell.Offset(0, -(k - i)).Interior.ColorIndex = 40
ActiveCell.Offset(0, (j - k)).Interior.ColorIndex = 40

ActiveCell.Offset((m - l) + 6, 0). _
Resize(32, 1).Interior.ColorIndex = 40
ActiveCell.Offset((m - l) + 43, 0). _
Resize(32, 1).Interior.ColorIndex = 40

End Sub

HTH
Regards,
Howard

"Mike" wrote in message
...
This is what i have & it works it is high lighting B cells column now i
want
to
high light AH cells column at the same time & from there i need to do rows
43 to 74 ,80 to 111,117 to 148,154 to 185,191 to 222, 228 to 259 also in
the
same
manner also B & AH columns have a conditional colour format red green or
yellow when these colours are in place it will not high light i believe if
you or someone can make this happen YOU MUST BE A GOD


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim Data As Range
Dim i As Integer
Dim j As Integer
Dim K As Integer
i = 2
j = 6
K = ActiveCell.Column()
Set Data = Range("B6:AH37")

Data.Interior.ColorIndex = xlNone

If ActiveCell.Row < 6 Or ActiveCell.Row 37 Or _
ActiveCell.Column < 2 Or ActiveCell.Column 54 Then
Exit Sub
End If

ActiveCell.Offset(0, -(K - i)). _
Resize(1).Interior.ColorIndex = 40

End Sub




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 to high light cells Mike Excel Discussion (Misc queries) 8 December 13th 09 04:41 PM
High Lighting cells with conditional colour formats Mike Excel Discussion (Misc queries) 1 December 12th 09 11:15 PM
Is it possible to high light a row of cells Mike New Users to Excel 2 December 10th 09 01:59 PM
high lighting Auto Control[_2_] Excel Discussion (Misc queries) 1 August 12th 08 06:07 AM
Hi-lighting figures Charlotte E Worcester Excel Discussion (Misc queries) 1 December 23rd 04 11:00 AM


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