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 May 25th, 2012, 03:16 PM
Authorized User
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Check two different cells

I have a worksheet which keeps up with personnel assignments. Column "C" has employee names, column "E" has employees days off in the format "M/T", T'W" etc. Cell G2 has the Now() formula which puts the current date in, and cell G3 has the day of the week. Column F is where the "Status" for the day goes; "8" for working, "V" for vacation, "RDO" for regular days off, etc.
I would like to know how to write VBA code to check an employees days off and if one of the days off is the current day of the week, then "RDO" would automatically be placed in column F. I assume it would have to be a worksheet change event? Maybe?

Last edited by billy1r; May 25th, 2012 at 03:19 PM..
 
Old May 26th, 2012, 09:21 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

The Change event fires whenever there is a change in the worksheet. How often you want this to be updated - daily basis?

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

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old May 26th, 2012, 10:36 AM
Authorized User
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Check Two different cells

Yes,
The two cells I mentioned (G3 and G2) update with the correct date and day of the week when the workbook is opened. The workbook is used every day. I am just trying to make it easy on the user so they don't have to put in RDO for the people who are off today! The subroutine should also color the background of the whole line, from column 2 to column 6, a yellow color when RDO is placed in column F.
Is this possible?
 
Old June 14th, 2012, 02:23 PM
Authorized User
 
Join Date: Feb 2009
Posts: 25
Thanks: 11
Thanked 0 Times in 0 Posts
Default Check two different cells

I would like this to happen when the workbook is opened, that way, the people who are off today there would appear "RDO" in their status column "F".





Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help!! on Checkbox click how to check from database whether clicked check match. damandeep BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 March 14th, 2011 08:39 AM
How to check programmatically check the password? thomaskelly ASP.NET 1.0 and 1.1 Basics 1 May 16th, 2008 08:49 PM
Connect to VSS check-in Check-out Programatically rhd110 General .NET 6 August 12th, 2007 07:46 AM
Help 'Check ListView' vs 'Check ListBox' MikeY C# 1 February 24th, 2005 02:20 PM





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