Complex Offset formula

Matt_Thompson

Board Regular
Joined
Apr 5, 2004
Messages
101
Hi,

I hope someone can help or at least put me in the right direction.

I have 3 offset formula's which I need to combine. This in itself shouldn't be a problem (I don't think!) but to make this a bit more complex, I have been told that the result of the offsets need to be capped at 20%+/-.

The 3 offsets are:
=SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))
divided by
=SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))
multiply
=OFFSET(I10,0,$BQ$1-1)

In the offsets I10 is this years monthly figures and $BQ$1 is the offset that is showing the current period.
I2 is the number of calendar days for that month.
U10 is last years monthly figures and the last offset is showing what the current Period figure is.

If I put all 3 formulae together, how would I then cap the outcome at between +20% and -20%?

Thanks in advance,

Matt
 

Some videos you may like

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Matt_Thompson

Board Regular
Joined
Apr 5, 2004
Messages
101
I've managed to do the formula so here it is for anyone who might find this useful:

=IF(SUM(SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))/SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))*SUM(OFFSET(I10,0,$BQ$1-1))/100)>20,20,AND(IF(SUM(SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))/SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))*SUM(OFFSET(I10,0,$BQ$1-1))/100)>-20,-20,(SUM(SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))/SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))*SUM(OFFSET(I10,0,$BQ$1-1))/100)))))

Where RED is saying if the offset formulae is greater than 20 put 20
BLUE is the same as above but for -20
Green is the else past of the if statement ie, if the first two criteria are false then follow this formula.

It's pretty crude and I'm sure it can be done much better than this but if this helps then feel free to use it or if anyone wants to know any more about this then PM me or mail me.

Thanks,

Matt
 

Matt_Thompson

Board Regular
Joined
Apr 5, 2004
Messages
101
Hi Dominic,

I tried that but it doesn't work. This is the formula I put into excel:

=MEDIAN(-0.2,(SUM(SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))/SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))*SUM(OFFSET(I10,0,$BQ$1-1))/100),0.2)

Am I doing something wrong?

Thanks,

Matt
 

Matt_Thompson

Board Regular
Joined
Apr 5, 2004
Messages
101
Apologies Dominic,

I have got it working now. Sorry!

Here is the formula:

=MEDIAN(-0.2,(SUM(I10:OFFSET(I10,0,$BQ$1-2))/SUM(I2:OFFSET(I2,0,$BQ$1-2))/SUM(U10:OFFSET(U10,0,$BQ$1-2))/SUM(U2:OFFSET(U2,0,$BQ$1-2))*SUM(OFFSET(I10,0,$BQ$1-1))/100),0.2)*100

Thanks for your help!,

Matt
 

Watch MrExcel Video

Forum statistics

Threads
1,109,029
Messages
5,526,340
Members
409,697
Latest member
christopherlewis1620

This Week's Hot Topics

Top