Solved

Excel VBA Highlighting cells on sheet change

Posted on 2014-10-26
2
414 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 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
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
Comment Utility
Great answer. Thanks very much
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
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 will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now