Formula mod needed for age, year, DOB

leopardhawk

Well-known Member
Joined
May 31, 2007
Messages
587
Office Version
  1. 2016
Platform
  1. Windows
Okay, my brain is cramping but I'm pretty sure this problem I'm having can be solved by someone a lot brighter than I am.

The two columns in question, columns B & C, need to work together for my worksheet to be accurate. They need to be able to account for users who are younger than 70 (which they are doing now) and users who are equal to or greater than 70. The formulas in column B are working fine as long as the user is under 70 years of age. If 'personal_info'!B12 is blank, the formula returns nothing. If the user enters their DOB in 'personal_info'!B12, the formula returns the Year of Birth + 70.

What I need is, if the user enters a DOB that makes them =>70 years of age, the formula in B16 will return the current year (2019) and C16 will return the users age this year.

Currently, there are no formulas in column C but I assume I need formulas there as well no matter what the user's age is.

The end result is that if the user is younger than 70, B16 will ALWAYS show the year they turn 70 and C16 will ALWAYS show 70. If the user is over 70, B16 will show the current year and C16 will show their current age. I get a headache just thinking about it but this is very important to me so any help is greatly appreciated.

<b>Excel 2016 (Windows) 32 bit</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF ;border: 1px solid;border-collapse: collapse; border-color: #B6AAA6"><colgroup><col width="25px" style="background-color: #E0E0F0 " /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0 ;text-align: center;color: #201116"><th></th><th>B</th><th>C</th></tr></thead><tbody><tr ><td style="color: #201116;text-align: center;">16</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">70</td></tr><tr ><td style="color: #201116;text-align: center;">17</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">71</td></tr><tr ><td style="color: #201116;text-align: center;">18</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">72</td></tr><tr ><td style="color: #201116;text-align: center;">19</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">73</td></tr></tbody></table><p style="width:2.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #B6AAA6;border-top:none;text-align: center;background-color: #E0E0F0 ;color: #201116">rrif</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF " ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF ;border-collapse: collapse; border-color: #B6AAA6"><thead><tr style=" background-color: #E0E0F0 ;color: #201116"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B16</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+70</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B17</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+71</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B18</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+72</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B19</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+73</font>)</td></tr></tbody></table></td></tr></table><br />
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
Maybe this will help you


<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:76.04px;" /><col style="width:78.89px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /><col style="width:76.04px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td><td >E</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#ffff00; font-weight:bold; "> </td><td style="background-color:#ffff00; font-weight:bold; text-align:center; ">Result</td><td style="background-color:#ffff00; font-weight:bold; text-align:center; ">Age</td><td style="background-color:#ffff00; font-weight:bold; "> </td><td style="background-color:#ffff00; font-weight:bold; text-align:center; ">DOB</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">79</td><td > </td><td style="text-align:right; ">10/09/1939</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">74</td><td > </td><td style="text-align:right; ">10/09/1944</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">80</td><td > </td><td style="text-align:right; ">02/04/1939</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">75</td><td > </td><td style="text-align:right; ">23/05/1944</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td > </td><td style="text-align:right; ">2020</td><td style="text-align:right; ">70</td><td > </td><td style="text-align:right; ">10/09/1950</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">70</td><td > </td><td style="text-align:right; ">10/09/1948</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">70</td><td > </td><td style="text-align:right; ">10/09/1949</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">70</td><td > </td><td style="text-align:right; ">01/01/1950</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">70</td><td > </td><td style="text-align:right; ">23/02/1949</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">71</td><td > </td><td style="text-align:right; ">25/05/1948</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B2</td><td >=IF(E2="","",IF(DATEDIF(E2,TODAY(),"y")<70,YEAR(TODAY())+(70-DATEDIF(E2,TODAY(),"y"))-1,YEAR(TODAY())))</td></tr><tr><td >C2</td><td >=IF(DATEDIF(E2,DATE(B2,MONTH(TODAY()),DAY(TODAY())),"y")>70,DATEDIF(E2,DATE(B2,MONTH(TODAY()),DAY(TODAY())),"y"),70)</td></tr></table></td></tr></table>
 

leopardhawk

Well-known Member
Joined
May 31, 2007
Messages
587
Office Version
  1. 2016
Platform
  1. Windows
DanteAmor,

This looks awesome! Thank you so much! I am still testing many scenarios. Would you mind if I run into any issues I will post them here in this thread if that is okay with you?

Thanks again!
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
DanteAmor,

This looks awesome! Thank you so much! I am still testing many scenarios. Would you mind if I run into any issues I will post them here in this thread if that is okay with you?

Thanks again!

Of course. Let me know any questions you have and I'll review it with pleasure.
 

leopardhawk

Well-known Member
Joined
May 31, 2007
Messages
587
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

DanteAmor, good morning. Okay, my testing has revealed a couple of 'hopefully' minor issues.

1. With regards to your formula for cells B2 and C2... In my original post, I said "The end result is that if the user is younger than 70, B16 will ALWAYS show the year they turn 70 and C16 will ALWAYS show 70. If the user is over 70, B16 will show the current year and C16 will show their current age." This was a mistake on my part because I should have said "The end result is that if the user is younger than 70, B16 will ALWAYS show the "END OF THE" year they turn 70 and C16 will ALWAYS show 70. If the user is over 70, B16 will show the "END OF THE" current year and C16 will show their current age "AT THE END OF THE YEAR." I have capitalized what I should have said for emphasis. Hopefully, this is a minor adjustment to the formula.

2. As you can see in my original post, there are several rows beneath the row in question. I only put four rows in my post but there are actually 70 rows below that need the formula to work in one year increments. I was hoping that once the formulas in B16 & C16 were working, that I could click-drag down to populate the rest of the rows. This does not work with the B16 formula and I am hoping that there is a solution for this as well.

I so much appreciate your help. Let me know if you need more information. Thanks!
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
DanteAmor, good morning. Okay, my testing has revealed a couple of 'hopefully' minor issues.

1. With regards to your formula for cells B2 and C2... In my original post, I said "The end result is that if the user is younger than 70, B16 will ALWAYS show the year they turn 70 and C16 will ALWAYS show 70. If the user is over 70, B16 will show the current year and C16 will show their current age." This was a mistake on my part because I should have said "The end result is that if the user is younger than 70, B16 will ALWAYS show the "END OF THE" year they turn 70 and C16 will ALWAYS show 70. If the user is over 70, B16 will show the "END OF THE" current year and C16 will show their current age "AT THE END OF THE YEAR." I have capitalized what I should have said for emphasis. Hopefully, this is a minor adjustment to the formula.

2. As you can see in my original post, there are several rows beneath the row in question. I only put four rows in my post but there are actually 70 rows below that need the formula to work in one year increments. I was hoping that once the formulas in B16 & C16 were working, that I could click-drag down to populate the rest of the rows. This does not work with the B16 formula and I am hoping that there is a solution for this as well.

I so much appreciate your help. Let me know if you need more information. Thanks!


In my examples I tried to put all the possibilities, less, equal and greater than 70 years. Even if in this year it turns 70 years before today's date or after today's date.


You could give an example of each case and the results you expect.


The formulas can be copied down.
 

leopardhawk

Well-known Member
Joined
May 31, 2007
Messages
587
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Below is a cross section of the sheet. Your formulas are in B16 and C16 and they are returning the correct information because I entered May 6, 1933 in "personal_info'!E12. What I need is for B17 to show 2020 and C17 to show 87, B18 to show 2021 and C18 to show 88, B19 to show 2022 and C19 to show 89 and so on all the way to the bottom of the sheet (total 70 rows). When I try to copy the formula down through the rows, I get 2019 in every row of column B and nothing changes at all in column C when I copy down.

I hope this helps.

<b>Excel 2016 (Windows) 32 bit</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF ;border: 1px solid;border-collapse: collapse; border-color: #B6AAA6"><colgroup><col width="25px" style="background-color: #E0E0F0 " /><col /><col /><col /><col /><col /><col /></colgroup><thead><tr style=" background-color: #E0E0F0 ;text-align: center;color: #201116"><th></th><th>B</th><th>C</th><th>D</th><th>E</th><th>F</th><th>G</th></tr></thead><tbody><tr ><td style="color: #201116;text-align: center;">13</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;">RRIF withdrawals for Name</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;"></td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;"></td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;"></td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;"></td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(226, 239, 218);;"></td></tr><tr ><td style="color: #201116;text-align: center;">14</td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;background-color: rgb(189, 215, 238);;">Estimated value of RRSP at end of 2019</td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(189, 215, 238);;"></td><td style="text-align: right;border-top: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(189, 215, 238);;"></td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;font-style: italic;background-color: rgb(189, 215, 238);;"></td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(189, 215, 238);;"> $ 62,250.00 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(226, 239, 218);;"></td></tr><tr ><td style="color: #201116;text-align: center;">15</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">Year</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">Age *</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">Percentage **</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">Amount</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">RRIF Value ***</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(255, 242, 204);;">Monthly Withdrawals</td></tr><tr ><td style="color: #201116;text-align: center;">16</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2019</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">86</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.05</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,112.50 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 61,471.88 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 259.38 </td></tr><tr ><td style="color: #201116;text-align: center;">17</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2004</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">71</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0528</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,245.72 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 60,531.36 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 270.48 </td></tr><tr ><td style="color: #201116;text-align: center;">18</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2005</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">72</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.054</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,268.69 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 59,532.59 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 272.39 </td></tr><tr ><td style="color: #201116;text-align: center;">19</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2006</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">73</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0553</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,292.15 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 58,472.91 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 274.35 </td></tr><tr ><td style="color: #201116;text-align: center;">20</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2007</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">74</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0567</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,315.41 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 57,350.23 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 276.28 </td></tr><tr ><td style="color: #201116;text-align: center;">21</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2008</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">75</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0582</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,337.78 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 56,163.08 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 278.15 </td></tr><tr ><td style="color: #201116;text-align: center;">22</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2009</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">76</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0598</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,358.55 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 54,910.64 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 279.88 </td></tr><tr ><td style="color: #201116;text-align: center;">23</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2010</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">77</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0617</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,387.99 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 53,581.80 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 282.33 </td></tr><tr ><td style="color: #201116;text-align: center;">24</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2011</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">78</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0636</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,407.80 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 52,183.32 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 283.98 </td></tr><tr ><td style="color: #201116;text-align: center;">25</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2012</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">79</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0658</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,433.66 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 50,706.53 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 286.14 </td></tr><tr ><td style="color: #201116;text-align: center;">26</td><td style="font-weight: bold;text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;font-style: italic;color: rgb(255, 255, 255);background-color: rgb(47, 117, 181);;">2013</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">80</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;">0.0682</td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 3,458.19 </td><td style="text-align: center;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 49,149.84 </td><td style="text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-bottom: 1px solid black;border-left: 1px solid black;background-color: rgb(217, 225, 242);;"> $ 288.18 </td></tr></tbody></table><p style="width:2.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #B6AAA6;border-top:none;text-align: center;background-color: #E0E0F0 ;color: #201116">rrif</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF " ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF ;border-collapse: collapse; border-color: #B6AAA6"><thead><tr style=" background-color: #E0E0F0 ;color: #201116"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B16</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12="","",IF(<font color=" 0">DATEDIF(<font color=" 0)">personal_info!$E$12,TODAY(<font color="rgb(0"></font>),"y"</font>)<70,YEAR(<font color=" 0)">TODAY(<font color="rgb(0"></font>)</font>)+(<font color=" 0)">70-DATEDIF(<font color="rgb(0">personal_info!$E$12,TODAY(<font color=" 0"></font>),"y"</font>)</font>)-1,YEAR(<font color=" 0)">TODAY(<font color="rgb(0"></font>)</font>)</font>)</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B17</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+71</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B18</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+72</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B19</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+73</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B20</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+74</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B21</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+75</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B22</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+76</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B23</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+77</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B24</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+78</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B25</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+79</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">B26</th><td style="text-align:left">=IF(<font color="rgb(255">personal_info!$E$12=0,"",YEAR(<font color=" 0">personal_info!$E$12</font>)+80</font>)</td></tr><tr><th width="10px" style=" background-color: #E0E0F0 ;color: #201116">C16</th><td style="text-align:left">=IF(<font color="rgb(255">DATEDIF(<font color=" 0">personal_info!$E$12,DATE(<font color=" 0)">B16,MONTH(<font color="rgb(0">TODAY(<font color=" 0"></font>)</font>),DAY(<font color="rgb(0">TODAY(<font color=" 0"></font>)</font>)</font>),"y"</font>)>70,DATEDIF(<font color=" 0">personal_info!$E$12,DATE(<font color=" 0)">B16,MONTH(<font color="rgb(0">TODAY(<font color=" 0"></font>)</font>),DAY(<font color="rgb(0">TODAY(<font color=" 0"></font>)</font>)</font>),"y"</font>),70</font>)</td></tr></tbody></table></td></tr></table><br />
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
Below is a cross section of the sheet. Your formulas are in B16 and C16 and they are returning the correct information because I entered May 6, 1933 in "personal_info'!E12. What I need is for B17 to show 2020 and C17 to show 87, B18 to show 2021 and C18 to show 88, B19 to show 2022 and C19 to show 89 and so on all the way to the bottom of the sheet (total 70 rows). When I try to copy the formula down through the rows, I get 2019 in every row of column B and nothing changes at all in column C when I copy down.

I hope this helps.

And if you add 1 in each column and copies B3 and C3 down.


<table border="1" cellspacing="0" style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:76.04px;" /><col style="width:43.72px;" /><col style="width:29.47px;" /><col style="width:76.04px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td > </td><td >A</td><td >B</td><td >C</td><td >D</td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="background-color:#ffff00; font-weight:bold; "> </td><td style="background-color:#ffff00; font-weight:bold; text-align:center; ">Result</td><td style="background-color:#ffff00; font-weight:bold; text-align:center; ">Age</td><td style="background-color:#ffff00; font-weight:bold; "> </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td > </td><td style="text-align:right; ">2019</td><td style="text-align:right; ">79</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td > </td><td style="text-align:right; ">2020</td><td style="text-align:right; ">80</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >4</td><td > </td><td style="text-align:right; ">2021</td><td style="text-align:right; ">81</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >5</td><td > </td><td style="text-align:right; ">2022</td><td style="text-align:right; ">82</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >6</td><td > </td><td style="text-align:right; ">2023</td><td style="text-align:right; ">83</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >7</td><td > </td><td style="text-align:right; ">2024</td><td style="text-align:right; ">84</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >8</td><td > </td><td style="text-align:right; ">2025</td><td style="text-align:right; ">85</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >9</td><td > </td><td style="text-align:right; ">2026</td><td style="text-align:right; ">86</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >10</td><td > </td><td style="text-align:right; ">2027</td><td style="text-align:right; ">87</td><td > </td></tr><tr style="height:19px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >11</td><td > </td><td style="text-align:right; ">2028</td><td style="text-align:right; ">88</td><td > </td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b></b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B2</td><td >=IF(personal_info!E2="","",IF(DATEDIF(personal_info!E2,TODAY(),"y")<70,YEAR(TODAY())+(70-DATEDIF(personal_info!E2,TODAY(),"y"))-1,YEAR(TODAY())))</td></tr><tr><td >C2</td><td >=IF(DATEDIF(personal_info!E2,DATE(B2,MONTH(TODAY()),DAY(TODAY())),"y")>70,DATEDIF(personal_info!E2,DATE(B2,MONTH(TODAY()),DAY(TODAY())),"y"),70)</td></tr><tr><td >B3</td><td >=B2+1</td></tr><tr><td >C3</td><td >=C2+1</td></tr></table></td></tr></table>
 

leopardhawk

Well-known Member
Joined
May 31, 2007
Messages
587
Office Version
  1. 2016
Platform
  1. Windows
Okay, that was fairly simple, for some reason I thought I needed a similar formula in those two columns all the way down. Thank you!

On another note, I still need the formulas in B2 and C2 to return the year and the age of the user at the END OF THAT YEAR. The way it is working now, it will return a different year and age dependent on whether or not their birthday has passed in the current year. I need the end of the year for both. Please?

Thanks!
 

DanteAmor

Well-known Member
Joined
Dec 3, 2018
Messages
12,622
Office Version
  1. 2007
Platform
  1. Windows
Okay, that was fairly simple, for some reason I thought I needed a similar formula in those two columns all the way down. Thank you!

On another note, I still need the formulas in B2 and C2 to return the year and the age of the user at the END OF THAT YEAR. The way it is working now, it will return a different year and age dependent on whether or not their birthday has passed in the current year. I need the end of the year for both. Please?

Thanks!

That makes these formulas, I put several examples in post #2
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,129,916
Messages
5,638,972
Members
417,063
Latest member
thematulaak

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top