# Two Formulas in one cell



## slk1987 (Dec 30, 2022)

Hello,

I am working on a formula which populates each row with "Client Profile" (C8) if the corresponding year for each row meets the years outlined in the client profile sheet (D8 & E8). If it does not, the cell returns $0. I have accomplished this with: 

=IF(AND(D7>='Client Profile'!$D$8,'Income Map'!D7<'Client Profile'!$E$8),'Client Profile'!$C$8,"$0")

I would like to add a component to this which changes the value of the first zero shown to the value in Client Profile C9. If the other formula were not present, it could be as simple as =IF(D11='Client Profile'!D9,'Client Profile'!C9,0) so I essentially need that formula to trump the If/then formula above....

For contect, this spreadsheet reflects an individuals salary for a certain number of years then shows one year of partial salary (client profile c9) in the year they retire (client profile d9)

Any assistance would be much appreciated.


----------



## slk1987 (Dec 31, 2022)

Just seeing if anyone has any thoughts on this..no luck so far...


----------



## offthelip (Dec 31, 2022)

try this:

```
=IF(D11='Client Profile'!D9,'Client Profile'!C9,IF(AND(D7>='Client Profile'!$D$8,'Income Map'!D7<'Client Profile'!$E$8),'Client Profile'!$C$8,"$0"))
```
All I did was substitute the zero 0 in your secdon equation with all of your first equation


----------

