Can I embed formulas in an Excel cell?
Can I embed formulas in an Excel cell?
Author
Discussion

Kermit power

Original Poster:

29,622 posts

243 months

Wednesday 3rd November 2021
quotequote all
Afternoon all,

I'm hoping PH can, as usual, deliver up a far faster response to an Excel query than anywhere else on the net?

I have a bunch of customer contracts where the customer has an annual volume available to them. I know the start date of their contract, and also their ongoing monthly consumption rate, and would like to create a spreadsheet which will automatically tell me the month in which they're going to need to buy additional volume if they're over-consuming at present.

I can easily calculate the number of months their current entitlement will last them, of course, and can use the =EDATE function to automatically calculate the calendar month in which they'll need additional volume based on their contract start date, but what I'd like to do is also use the =ROUNDDOWN function to always round the number of months in which they'll burn through their current entitlement down rather than up, so I'd have a formula looking something like this:

=EDATE(A1,(=ROUNDDOWN(B1,0))

But it seems as though I can't embed one formula into another. Is there any way I can do this without having to include an ugly extra column in my spreadsheet to first round the months down before using them in the EDATE formula?

Stiggolas

361 posts

177 months

Wednesday 3rd November 2021
quotequote all
Add the ugly column and hide it?

Kermit power

Original Poster:

29,622 posts

243 months

Wednesday 3rd November 2021
quotequote all
Stiggolas said:
Add the ugly column and hide it?
Yeah, I will if I have to, I was just hoping for a really clean solution to soothe my OCD! biggrin

In the ideal world I'd have the calculation of the months required embedded into the same formula as well, so if someone asks me how I do it, I can just respond with "it's a box of magic frogs"! hehe

Doofus

34,508 posts

203 months

Wednesday 3rd November 2021
quotequote all
I don't know EDATE, but in that formula, your second "=" is not required.

dozen

148 posts

236 months

Wednesday 3rd November 2021
quotequote all
Try removing the = that you have before ROUNDDOWN

mat205125

17,790 posts

243 months

Wednesday 3rd November 2021
quotequote all
Kermit power said:
Afternoon all,

I'm hoping PH can, as usual, deliver up a far faster response to an Excel query than anywhere else on the net?

I have a bunch of customer contracts where the customer has an annual volume available to them. I know the start date of their contract, and also their ongoing monthly consumption rate, and would like to create a spreadsheet which will automatically tell me the month in which they're going to need to buy additional volume if they're over-consuming at present.

I can easily calculate the number of months their current entitlement will last them, of course, and can use the =EDATE function to automatically calculate the calendar month in which they'll need additional volume based on their contract start date, but what I'd like to do is also use the =ROUNDDOWN function to always round the number of months in which they'll burn through their current entitlement down rather than up, so I'd have a formula looking something like this:

=EDATE(A1,(=ROUNDDOWN(B1,0))

But it seems as though I can't embed one formula into another. Is there any way I can do this without having to include an ugly extra column in my spreadsheet to first round the months down before using them in the EDATE formula?
You only need the = at the start

Remove the = in front of the ROUNDDOWN

Fast and Spurious

1,802 posts

118 months

Wednesday 3rd November 2021
quotequote all
Wot they all said.

Kermit power

Original Poster:

29,622 posts

243 months

Wednesday 3rd November 2021
quotequote all
Thanks all!!! My spreadsheet now looks much lovlier! biggrin

sideways sid

1,466 posts

245 months

Wednesday 3rd November 2021
quotequote all
=Start Date + ((Annual Volume/(Monthly Consumption * 12)*365)

will give you the precise date. Subtract 21 days or whatever suits you to contact the customer to discuss a volume increase or extension.