Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 258
Default Conditional to change cell color by Selecting Cells

It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Conditional to change cell color by Selecting Cells

Try this:-

Right click the sheet tab and paste this in.

Public LastCell As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set LastCell = Target
End Sub

Mike

"maperalia" wrote:

It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia



  #3   Report Post  
Posted to microsoft.public.excel.misc
JB JB is offline
external usenet poster
 
Posts: 115
Default Conditional to change cell color by Selecting Cells

http://cjoint.com/?gwve7iDErM

-Select range A2:D16
-Format/MFC
=And(Row()=Cell("row");Column()=Cell("column"))

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Calculate
End Sub

JB
http://boisgontierjacques.free.fr/

On 22 juin, 20:00, maperalia
wrote:
It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 258
Default Conditional to change cell color by Selecting Cells

Mike;
Thanks for the code works wonderful!!. However, I forgot to mention that the
sheet where I want to put this conditional does not exist in the original
"Template File".

After I run a specific macro in the "Template File". The sheet where I want
to put this conditional is been created and named it as a "LIST". Therefore,
my question is; what statement can I use to insert the module on this sheet
when I run the macro?

Thanks.
Maperalia.
"Mike H" wrote:

Try this:-

Right click the sheet tab and paste this in.

Public LastCell As Range

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not LastCell Is Nothing Then
LastCell.Interior.ColorIndex = xlNone
End If
Target.Interior.ColorIndex = 6
Set LastCell = Target
End Sub

Mike

"maperalia" wrote:

It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 258
Default Conditional to change cell color by Selecting Cells

JB;
Thanks for the formula. However, when I put it in the condition an then
click OK I got the message that the formula has error.

Maperalia

"JB" wrote:

http://cjoint.com/?gwve7iDErM

-Select range A2:D16
-Format/MFC
=And(Row()=Cell("row");Column()=Cell("column"))

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Calculate
End Sub

JB
http://boisgontierjacques.free.fr/

On 22 juin, 20:00, maperalia
wrote:
It is possible to change the font color of the select cell only.
For example, If I select the cell A1 I want to see the font in blue, bold,
however, after I select the cell A2 I want the cell A1 to return to its
previous setup and get the blue, bold at cell A2.
Therefore, the conditional will work only for selected cell if not select
return to original setup.

Thanks in advance.
Maperalia




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
Applying conditional formating to make cells change color [email protected] Excel Discussion (Misc queries) 1 March 6th 07 11:51 PM
Conditional formating-change color of cells over than one with for carrera Excel Discussion (Misc queries) 4 November 28th 06 08:49 AM
How can I change cell color using conditional formatting Brian Excel Discussion (Misc queries) 1 September 17th 06 01:38 PM
Result of IF conditional change cell color Olasin Excel Discussion (Misc queries) 1 May 16th 06 10:37 PM
Conditional change to cell color Richard Excel Discussion (Misc queries) 3 December 13th 04 06:03 PM


All times are GMT +1. The time now is 05:14 PM.

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"