ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Combining 2 IF statements to make one formula. (https://www.excelbanter.com/excel-worksheet-functions/161499-combining-2-if-statements-make-one-formula.html)

Rip1877

Combining 2 IF statements to make one formula.
 
I need to combine the following 2 IF statements, or find a different formula
to make this happen.

=IF($K$6="","",$K$6+14)

=EOMONTH(K6,0)

K6 is the starting date of a payperiod, so the first formula goes to the
15th of the month. The second formula is needed if the start of the payperiod
is the 16th.

Elkar

Combining 2 IF statements to make one formula.
 
See if this is what you're looking for:

=IF($K$6="","",IF(DAY($K$6)=1,$K$6+14,DATE(YEAR($K $6),MONTH($K$6)+1,0)))

HTH,
Elkar



"Rip1877" wrote:

I need to combine the following 2 IF statements, or find a different formula
to make this happen.

=IF($K$6="","",$K$6+14)

=EOMONTH(K6,0)

K6 is the starting date of a payperiod, so the first formula goes to the
15th of the month. The second formula is needed if the start of the payperiod
is the 16th.


Rip1877

Combining 2 IF statements to make one formula.
 
Oh man thank you so much that worked perfectly for me! Thank you so much

"Elkar" wrote:

See if this is what you're looking for:

=IF($K$6="","",IF(DAY($K$6)=1,$K$6+14,DATE(YEAR($K $6),MONTH($K$6)+1,0)))

HTH,
Elkar



"Rip1877" wrote:

I need to combine the following 2 IF statements, or find a different formula
to make this happen.

=IF($K$6="","",$K$6+14)

=EOMONTH(K6,0)

K6 is the starting date of a payperiod, so the first formula goes to the
15th of the month. The second formula is needed if the start of the payperiod
is the 16th.



All times are GMT +1. The time now is 07:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com