Formula calculates in cells according to a criteria

el_ja

Board Regular
Joined
Nov 5, 2007
Messages
80
Hello
I'm not quite sure how to explain it.
I want a simple formula of payments, in this example $100 in 5 months means $20 a month.
But I don't want to be adding formulas every time I change the months for example

Value100Months5
123456789101112
+10/5+10/5+10/5+10/5+10/5

<tbody>
</tbody>

If I want to do 8 months now it would be
Value100Months8
123456789101112
+10/6+10/6+10/6+10/6+10/6+10/6+10/6+10/6

<tbody>
</tbody>


I want to have a formula in all 12 columns all the time, but it only shows a value in any number of months from the criteria and 0 in the remaining months.
I'm thinking it should be done with an array, but I don't even know how to start searching.
Thanks for the help.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

If your data is set up just like your sample where the months are just numbers, then you can do this, however, I don't understand why you're dividing 10 rather then 100, and by 6 rather than 8 for 8 months:


Book1
ABCDEFGHIJKL
1Value100Months8
2
3123456789101112
412.512.512.512.512.512.512.5
Sheet50
Cell Formulas
RangeFormula
A4=IF(A3<$E1,$B1/$E1,"")


A4 formula copied across to month 12 or more as needed.
 
Upvote 0
Sorry, my mistake (and can't find the edit button)... I started thinking one thing and writing another.
I must be 100 instead of 10, and 8 instead of 6.

The formula worked great, I was overthinking it too much.
Thanks a lot!
 
Upvote 0
You're welcome, glad you got it to work.
 
Upvote 0

Forum statistics

Threads
1,216,134
Messages
6,129,070
Members
449,485
Latest member
greggy

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top