Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jose Juan
 
Posts: n/a
Default When I am in one cell highlight another

Hello,

When I am in one cell highlight another. Lets say that if my cursor is in
A1 I want D1 highlighted or with another cursor on it.
Then if I move to A2, D2 should be the one with another cursor or highlighted.

Thank you for your help,
Jose Juan Diaz

  #2   Report Post  
Héctor Miguel
 
Posts: n/a
Default

hi, Jose Juan !

When I am in one cell highlight another
... if my cursor is in A1... D1 highlighted or with another cursor on it.
... if I move to A2, D2 should be the one with another cursor or highlighted.


'put' a cursor on non-active-cell... [I don't think it's possible] :(
to highlight 'D' when activecell in 'A'...
- select 'D' [entire column]
- go to [menu] format / format conditions...
- formula: =and(cell("row")=row(),cell("column")=1)
- apply formats as needed [font, color, pattern...]
- right-click 'that' sheet-tab - view code...
- copy/paste the following lines...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = True
End Sub

hth,
hector.


  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

One way

'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target.Offset(0, 3)
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
.Interior.ColorIndex = 20
End With

.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
.FormatConditions(1).Interior.ColorIndex = 36
End With

End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
HTH

Bob Phillips

"Jose Juan" <Jose wrote in message
...
Hello,

When I am in one cell highlight another. Lets say that if my cursor is in
A1 I want D1 highlighted or with another cursor on it.
Then if I move to A2, D2 should be the one with another cursor or

highlighted.

Thank you for your help,
Jose Juan Diaz



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
cell color index comparison MINAL ZUNKE New Users to Excel 1 June 30th 05 07:11 AM
Function syntax to compare cell contents ES Excel Worksheet Functions 2 May 18th 05 03:53 PM
highlight range if cell contains desired data The Other Bollinger New Users to Excel 7 March 24th 05 01:30 AM
How do I have an active cell highlight automatically lstuckey Excel Discussion (Misc queries) 2 February 14th 05 08:28 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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