# Add days to Calculated Columns base on Number of Months

Copper Contributor

# Add days to Calculated Columns base on Number of Months

Hi,

I am currently creating a sharepoint list for payment monitoring.
I have columns: Months to Pay (number), First Payment(date), Second Payment(date).

I'm looking for a formula for the Third Payment, that if Months to Pay is greater than or equal to 3 will add 60 days from First Payment.

Hope anyone can help me with this. Thank you.

7 Replies

# Re: Add days to Calculated Columns base on Number of Months

@Rowell2022 you can use the date and day formulas to add number of days.

https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/bb862071(v=offi...

Below is an example for your setup

In this example I am using the Second Payment date if the months is less than 3 btw. Don't know what you want to use in that case?

``=IF([Months to Pay]>=3,DATE(YEAR([First Payment]),MONTH([First Payment]),DAY([First Payment])+60),[Second Payment])``

# Re: Add days to Calculated Columns base on Number of Months

Hi @Expiscornovus

Thank you it worked. But how can I enter the formula for a blank if criteria does not meet.

# Re: Add days to Calculated Columns base on Number of Months

@Rowell2022 if you want to leave it empty you can just use

``" "``

``=IF([Months to Pay]>=3,DATE(YEAR([First Payment]),MONTH([First Payment]),DAY([First Payment])+60)," ")``

# Re: Add days to Calculated Columns base on Number of Months

You've helped me a lot, Thank you, Expicornovus!

# Re: Add days to Calculated Columns base on Number of Months

@Rowell2022, no problem. Happy to help out.

# Re: Add days to Calculated Columns base on Number of Months

Hi Expiscornovus,

Will you be able to turn this formula to power automate? My problem is that CALCULATED COLUMNS cannot be call in power automate.
=IF([Months to Pay]>=3,DATE(YEAR([First Payment]),MONTH([First Payment]),DAY([First Payment])+60)," ")

Big thank you.

# Re: Add days to Calculated Columns base on Number of Months

@Rowell2022 yes, sure.

That would be something like:

``if(greaterOrEquals(item()['MonthstoPay'], 3), addDays(item()['FirstPayment'], 60), '')``