Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default get values and colors back in a cell

Is it possible to get the value, the formula, the color inside, and the font
color once they are changed in Worksheet_change?
I have in a cell a formula that searches for a certain value on another
worksheet.
When I open the workbook, those values get a specific color (font and
interior).
In the row beneath, I can enter another value. Then the cell above get that
value and the specific color for that new value.
Now I'm searching for a way that, when I remove the last entered value, the
cell above gets the old value (by formula) and the colors need to be set for
that specific value.
Ex:
A B C
1 3 3 3 <-- before changing: color = black,
interior = yellow
2

1 3 3 2 <-- after changing: color = blue,
interior = red
2 2 <-- cell with inputs: color = blue,
interior = red

When I delete the 2 (in row 2 - column C), I like to have the "3" back with
the colors black as font and yellow as interior.

Anyone any idea?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 417
Default get values and colors back in a cell

Use code like the following in your Worksheet_Change event handler to refer
to the cell above the Target cell:

Dim rngCellAbove as Range

Set rngCellAbove = Target.Offset(-1,0)

.... then do whatever you want with rngCellAbove.

In similar fashion, the cell below would be Target.Offset(1,0).

--
Regards,
Bill Renaud



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
Dynamically setting CELL COLORS based on TWO OTHER cell values Tom Excel Discussion (Misc queries) 3 February 22nd 09 07:34 PM
Can't format font colors or cell fill-in colors canoeron Excel Discussion (Misc queries) 3 August 22nd 05 11:46 PM
Can an excel cell automatically change fill colors based on values John Clark Excel Discussion (Misc queries) 1 February 5th 05 05:21 PM
Changing cell colors based on values Jon Willits Excel Programming 3 February 29th 04 08:06 PM
Help Evaluating Cell Values and Changing Colors ChrisG[_2_] Excel Programming 1 July 14th 03 08:52 PM


All times are GMT +1. The time now is 03:00 AM.

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"