Forum Discussion
Age formula not calculating
You say that you're a beginner at Excel, so I'll be presumptuous and note that there are other things you could do that might make your overall spreadsheet easier to maintain. Certainly there are "tricks" you could learn that will be beneficial in the future.
For example, you have today's date appearing in every row, and then use that redundant data in the calculation of the ages of the patient referred to in that row. More efficient would be to have a separate cell off to the side,say in cell M1 and have that cell contain today's date. =TODAY()
(that "off to the side" could also be elaborated on in a later lesson.)
Then the age calculation in your cell C2, now reading =DATEDIF(E2,D2,"M") would become
=DATEDIF($M$1,D2,"M")
Those dollar signs make the reference a "absolute reference" instead of the "relative reference" of E2. Then, when you copy the formula down to all the lower rows, it stays $M$1, while the D2 becomes D3, D4,.....
That's the way to handle variables that are, in fact, semi-constant and that are referred to in multiple places in a spreadsheet.
I'd also recommend looking into Data Validation. It occurs to me that you may have downloaded the actual diagnoses (and possible all of the patient data)...but if you find yourself adjusting diagnoses, Data Validation could save typing the words and insure consistency.