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 November 21st, 2013, 07:42 AM
Registered User
 
Join Date: Nov 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Placing birthday in cell

Hi Everyone

I am wanting to read a set of students birthdays, calculate the current age and place it in a cell that represents a specific day in a specific week. i.e. I have a sheet that has a term with 10 rows representing 10 weeks of the 2014 calendar. Each week includes weekends. I can calculate the current age, but getting Excel to search for the birthday and place the age in is another matter!
 
Old December 6th, 2013, 08:41 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

You need to start your code from the list of birthdays as weeks..So you can split the birthday to 52 weeks

Datediff function would provide you.the date difference between the birthday and reference day, say 1st Jan In days

You can use the Mod function to get the week by dividing by 7

Now based on the week.number you can place it in appropriate cells

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

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
The Following User Says Thank You to Shasur For This Useful Post:
IanJM (December 8th, 2013)
 
Old December 8th, 2013, 03:53 AM
Registered User
 
Join Date: Nov 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Birthday problem

Hi

Thanks for this. I have been using Datediff to find current age, but it still evades me as to get it to step through a calendar and find a specific date such as the date a student turns 12. Does it print the cumulative age in each cell? i.e. I have 52 weekly dates then I search for the one that is when the student turns 12? I think I would like a piece of code for this!

Many thanks
 
Old December 8th, 2013, 06:24 PM
Registered User
 
Join Date: Nov 2013
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Birthday and Calendar in one row problem

Can you make a Calendar in one row and 52 columns? i.e. each student would have a row containing their name and birthday followed by 52 columns on of which contains the twelfth birthday would be highlighted.

Ian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Is today Matt Doyle's 64th Birthday? geneous42 BOOK: Beginning PHP 5.3 0 August 23rd, 2011 10:54 PM
Send Auto Mail for Birthday wishes bspradeep Classic ASP Professional 4 February 28th, 2007 06:13 AM
Email to todays Birthday users t400 SQL Server 2000 2 September 6th, 2006 08:24 AM
Generate birthday wish Prabhakar_dt Classic ASP Basics 8 January 29th, 2005 02:09 AM
Lose cell Text when editing cell in VSFlexGrid 6 bobcratchet VB How-To 0 July 30th, 2004 09:32 AM





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