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 June 15th, 2011, 09:41 AM
Authorized User
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Format cell based on another cell

I have a spreadsheet which keeps up with employees training. Column "I" contains the date training was taken. Column "J" contains the date training expires by using a formula which calculates one year from the date in column "I". When the date in Column "J" is reached, I would like for the corresponding cell in Column "K" to turn red and EXPIRED appear in white.
Can this be done with VBA or do I need a formula or condtional formatting? I've tried a lot of things but nothing seem to work.
Old June 15th, 2011, 09:06 PM
Friend of Wrox
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts

You can do that with the combination of an IF Function and Conditional Formatting

=IF(J1<TODAY(),"Expired","") in Column K

should check for the date and update Column as expired

Then you can have Conditional formatting to check for 'Expired' and do the rest

C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips &amp; Tricks (http://www.vbadud.blogspot.com)
The Following User Says Thank You to Shasur For This Useful Post:
billy1r (June 16th, 2011)

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell Coloring in VBA based on value in column FinalFive Excel VBA 3 March 24th, 2008 03:29 PM
copy columns based on cell values EricB123 Excel VBA 0 December 18th, 2007 12:51 AM
How to create a Hyperlink based on Cell Contents chatguy Excel VBA 4 October 15th, 2007 09:43 PM
Lose cell Text when editing cell in VSFlexGrid 6 bobcratchet VB How-To 0 July 30th, 2004 09:32 AM
change background color of cell based on value vurtman ASP.NET 1.0 and 1.1 Basics 4 February 26th, 2004 03:52 PM

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