A Conversation for Ask h2g2
Excel formula needed, any help?
I'm not really here Started conversation Mar 15, 2009
Not sure this is possible, but it's beyond me if it is.
I want excel to do a sum for me, I'll try to explain it!
I want it to multiply the numbers in two different cells by two different numbers and add them together.
So G2 x 25 + H2 x 10 = Total
Then I want it to minus 1 from a number in a different cell, and if it equals more than 0, multiply that number by 25% of the total and add it to the total and give me a final number.
Does that make sense?
I want it to calculate boarding fees for me, so I add in number of days/half days and number of dogs and it tells me how much to charge.
And of course I want to have a running total of a load of rows at the bottom for my books so I can work out if the agro of having dogs in the house is worth the HUMUNGOUS licence fee I've just paid.
Here's my charges in case that helps.
Each full day - £25
Half day £10
additional dogs - 25% of total each
EG one dog for one day is £25. Two dogs is £31.25, three is £37.50, four dogs, £43.75
Excel formula needed, any help?
Otto Fisch ("Stop analysing Strava.... and cut your hedge") Posted Mar 15, 2009
I'm not sure I quite follow that, but I suspect the answer will involve using brackets.
=((G2 x 25) + (H2 x 10))-1
This will multiply g2x25 and h2x10 first, then add them together, and then subtract 1.
IF commands are beyond my expertise - sorry.
Excel formula needed, any help?
I'm not really here Posted Mar 15, 2009
The minus one is for another cell, so I don't need that on the multiplication.
but at least it did the multiplication for me, and it seems to be correct!
Excel formula needed, any help?
Mu Beta Posted Mar 15, 2009
IF commands are relatively simple. You'll be wanting something along the lines of:
IF((B4>1;H4+(H4/4);H4)
Where B4 is the number of dogs, H4 is the subtotal you've already worked out using the above.
The first bit of the bracket is the 'condition', saying you will only add 25% for additional dogs. The second bit is what happens if the condition is true (ie. B4 is greater than 1), and the third bit is what happens if the condition is false (ie. B4=1)
B
Excel formula needed, any help?
Syren Posted Mar 15, 2009
That doesn't account for having any more than two dogs though. I think that you actually don't need an IF thingy.
You already have your total for one dog, say in I2. Let's say number of dogs is in B2.
Total for all dogs =I2+(B2-1)*0.25*I2
If there is only one dog then B2-1=0 and that term will disappear.
Key: Complain about this post
Excel formula needed, any help?
More Conversations for Ask h2g2
Write an Entry
"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."