Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 20th, 2005, 11:30 AM
Registered User
Join Date: Oct 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel Worksheet_Change option

Spreadsheet cell (s) are linked to other cells/calculations. The cells in question will change value based on changes in values in OTHER cells and based on calculations. I am using the following code to update colors in final cells, but Worksheet_change() does not allow for changes based on calcs. Any ideas as to how I can update colors? Thanks

Private Sub Worksheet_Change(ByVal Target As Excel.Range)

Dim cel As Range

For Each cel In Range("BB10:BF31").Cells
    If IsNumeric(cel.Value) Then
        If cel.Value >= 1 And cel.Value <= 25 Then
            cel.Interior.ColorIndex = 4
        ElseIf cel.Value >= 26 And cel.Value <= 50 Then
            cel.Interior.ColorIndex = 35
        ElseIf cel.Value >= 51 And cel.Value <= 75 Then
            cel.Interior.ColorIndex = 6
        ElseIf cel.Value >= 76 And cel.Value <= 100 Then
            cel.Interior.ColorIndex = 3
        End If
    ElseIf cel.Value >= "N/A" Then
        cel.Interior.ColorIndex = 15
    End If
Old October 21st, 2005, 09:27 AM
Authorized User
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts


If I'm not mistaking, there is a function Worksheet_Calculate. This is ran when a recalculation occurs

maybe this helps

Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help!!!!!Private Sub Worksheet_Change VicM Excel VBA 1 March 6th, 2008 10:35 PM
Hiding Excel Print & Save Option Only p.muralikrishnaa VB Components 0 September 23rd, 2006 12:07 AM
Learning VB in Excel: Is .Net 2003 an option? skinfreak VB.NET 2002/2003 Basics 3 April 27th, 2005 02:50 PM
Controlling Print Option for Excel rendered report nitachil BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 0 October 25th, 2004 07:34 PM
How to step into Worksheet_Change Piblon Excel VBA 2 December 17th, 2003 04:11 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.