Solved

Excel VBA Highlighting cells on sheet change

Posted on 2014-10-26
2
458 Views
Last Modified: 2014-10-27
Hi
I use the following code to highlight cells when values are changed. I also highlight
the last cell in that row to show that it has been changed
It works fine for one cell but when I copy the changed value
down with the mouse the cell that changes changes color but
the cell at the end of the row doesn't change color

Private Sub Worksheet_Change(ByVal Target As Range)
                    Application.Cells(Target.Row, Target.Column).Interior.Color = 65535
                    Application.Cells(Target.Row, 16384).Interior.Color = 65535
End Sub
0
Comment
Question by:murbro
2 Comments
 
LVL 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40405795
Hi,

pls try

Private Sub Worksheet_Change(ByVal Target As Range)
    Target.Interior.Color = 65535
    Target.Offset(0, 16384 - Target.Column).Interior.Color = 65535
End Sub

Open in new window

Regards
0
 

Author Closing Comment

by:murbro
ID: 40405858
Great answer. Thanks very much
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question