Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 1
Default Updating gestational age based on today's date

Hi,
I work in a hospital providing support for families of premature infants. I use an excel spreadsheet to track the patients that I work with. I'm hoping someone can assist me in creating a formula for my spreadsheet to display an updated baby's age based on today's date.
For instance, I would enter a baby's birthday in "a1", the baby's gestational age at birth in "a2" (ex: 29 weeks 2 days or 29 2/7), and then have a formula in "a3" that tells me how old they are today in weeks.
Is this possible?
Example: A baby is born on 8/20/2014 at 30 weeks 2 days. I need a formula to show me that on today's date (8/26/2014) the baby is now 31 weeks 1 day old. I'd like it to display as 31 weeks 1 day or 31 1/7.

Thanks so much!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default Updating gestational age based on today's date

Hi,

Am Tue, 26 Aug 2014 21:07:51 +0100 schrieb zomccoy:

Example: A baby is born on 8/20/2014 at 30 weeks 2 days. I need a
formula to show me that on today's date (8/26/2014) the baby is now 31
weeks 1 day old. I'd like it to display as 31 weeks 1 day or 31 1/7.


in A1: 8/20/2012
in A2: 30 weeks 2 days

Then try:
=INT((TODAY()-A1+LEFT(A2,FIND(" ",A2)-1)*7+MID(A2,FIND("weeks",A2)+6,1))/7)&" weeks "&MOD(TODAY()-A1+LEFT(A2,FIND(" ",A2)-1)*7+MID(A2,FIND("weeks",A2)+6,1),7)&" days"


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default Updating gestational age based on today's date

On Tue, 26 Aug 2014 21:07:51 +0100, zomccoy wrote:


Hi,
I work in a hospital providing support for families of premature
infants. I use an excel spreadsheet to track the patients that I work
with. I'm hoping someone can assist me in creating a formula for my
spreadsheet to display an updated baby's age based on today's date.
For instance, I would enter a baby's birthday in "a1", the baby's
gestational age at birth in "a2" (ex: 29 weeks 2 days or 29 2/7), and
then have a formula in "a3" that tells me how old they are today in
weeks.
Is this possible?
Example: A baby is born on 8/20/2014 at 30 weeks 2 days. I need a
formula to show me that on today's date (8/26/2014) the baby is now 31
weeks 1 day old. I'd like it to display as 31 weeks 1 day or 31 1/7.

Thanks so much!



For 31 1/7 output:

=TEXT((TODAY()-A1+LEFT(A2,FIND(" ",A2)-1)*7+TRIM(MID(SUBSTITUTE(A2," ",REPT(" ",99)),99*2,99)))/7,"0 ?/7")

The weeks days format is more complex, and I also adjust for the fact that, other than 1, day would be plural.

=TEXT(INT((TODAY()-A1+LEFT(A2,FIND(" ",A2)-1)*7+TRIM(
MID(SUBSTITUTE(A2," ",REPT(" ",99)),99*2,99)))/7),"0 ""weeks """) &
TEXT( MOD((TODAY()-A1+LEFT(A2,FIND(" ",A2)-1)*7+TRIM(
MID(SUBSTITUTE(A2," ",REPT(" ",99)),99*2,99))),7)," 0 ""day""") &
IF(MOD(C2,7)<1,"s","")



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Color of Cell based on Date and today's date. SammiJojo412 Excel Worksheet Functions 1 July 23rd 12 10:18 PM
multiple If's based on today's date dballou Excel Worksheet Functions 5 March 24th 08 03:28 PM
SUM based on Date < TODAY() [email protected] Excel Discussion (Misc queries) 3 July 18th 06 04:09 PM
How do I stop today() from updating date on saved spreadsheets? lionmark Excel Discussion (Misc queries) 2 January 4th 05 01:03 AM
Show a date based on today DJ Dusty Excel Worksheet Functions 0 November 11th 04 10:32 PM


All times are GMT +1. The time now is 08:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"