leopardhawk
Well-known Member
- Joined
- May 31, 2007
- Messages
- 611
- Office Version
- 2016
- Platform
- Windows
Hello forum friends, I have a working formula in a cell (B145) that I want to modify but I continuously keep running into errors, likely because I am such a noob... It's likely some type of nested IF statement but wow, I can't figure it out. Here is the formula as it is right now.
So, what I want to do is add two more IF statements to the one above so that the resulting sentence starts with either the word NAME or if there is something in 'personal_info!C9, then the sentence will start with the person's name and a pronoun based on their gender. See below.
So, here is a summary:
What I need is cell B145 to look like this "Name started their CPP at 0 years 0 months of age" when the cells C9, E9, F9, and F15 on 'personal_info' are blank.
If the user enters a name (Bob) in C9, I need cell B145 to look like this "Bob started their CPP at 0 years 0 months of age".
If Bob enters his gender in cell F9, I need cell B145 to look like this "Bob started his CPP at 0 years 0 months of age".
If Bob enters a birth date in E9 and cell F15 is blank, I need cell B145 to look like this "Bob started his CPP at 0 years 0 months of age".
If Bob enters a birth date in E9 and cell F15 has a CPP start date in it, I need cell B145 to look like this "Bob started his CPP at 64 years 3 months of age".
The way the formula is currently, it does work but I am trying to add in the user's name and a pronoun. Should be easy, right??? ?
I sure hope someone can help me out here! Thanks!
Code:
=IF(personal_info!E9>personal_info!F15,"Started CPP at 0 years 0 months of age.","Started CPP at "&DATEDIF(personal_info!E9,personal_info!F15,"y")& " years " &DATEDIF(personal_info!E9,personal_info!F15,"ym")&" months of age.")
Code:
=IF(personal_info!C9=0,"Name",personal_info!C9)
Code:
=IF(personal_info!F9="M","his",IF(personal_info!F9="F","her","their"))
So, here is a summary:
What I need is cell B145 to look like this "Name started their CPP at 0 years 0 months of age" when the cells C9, E9, F9, and F15 on 'personal_info' are blank.
If the user enters a name (Bob) in C9, I need cell B145 to look like this "Bob started their CPP at 0 years 0 months of age".
If Bob enters his gender in cell F9, I need cell B145 to look like this "Bob started his CPP at 0 years 0 months of age".
If Bob enters a birth date in E9 and cell F15 is blank, I need cell B145 to look like this "Bob started his CPP at 0 years 0 months of age".
If Bob enters a birth date in E9 and cell F15 has a CPP start date in it, I need cell B145 to look like this "Bob started his CPP at 64 years 3 months of age".
The way the formula is currently, it does work but I am trying to add in the user's name and a pronoun. Should be easy, right??? ?
I sure hope someone can help me out here! Thanks!