Hello,

I have a table that looks like this:

----------------------------
A B C D E
1. 8
2. 6 3 4 3 2
3. Output: 3
---------------------------

The output value should show the number of columns (starting from E2
going to the left) it takes to add until the value (of the figures in
row E) is higher than E1.

In this case that would be 2 + 3 + 4 > 8, therefore the output would
be 3.
If E1 is 13, then the output would be 5, etc.

This formula is used to calculate the number of months of expenses to
replace an inventory figure.

Thanks for your time.

Re: Count number of values until exceeding a figure by Ed

Ed
Mon May 12 05:57:06 CDT 2008

Hi tunupo,

One way;

Put this formula in cell E3
=SUM(E2:$E2)>$E$1

Copy it to D3:A3

In cell E4 enter
=COUNTIF(A3:E3,FALSE)+1

Does that do what you want?

Ed Ferrero
www.edferrero.com


> Hello,
>
> I have a table that looks like this:
>
> ----------------------------
> A B C D E
> 1. 8
> 2. 6 3 4 3 2
> 3. Output: 3
> ---------------------------
>
> The output value should show the number of columns (starting from E2
> going to the left) it takes to add until the value (of the figures in
> row E) is higher than E1.
>
> In this case that would be 2 + 3 + 4 > 8, therefore the output would
> be 3.
> If E1 is 13, then the output would be 5, etc.
>
> This formula is used to calculate the number of months of expenses to
> replace an inventory figure.
>
> Thanks for your time.

Re: Count number of values until exceeding a figure by tunupo

tunupo
Mon May 12 21:07:07 CDT 2008

Thanks to Ed Ferrero,

It helped me to solve the problems!