stockviper
New Member
- Joined
- Mar 17, 2016
- Messages
- 2
Hello all I am having an issue with a formula in my spreadsheet. I have run out of thought on my formula. Background. I have stores I'm looking at for periods of time for sales comp. That information is in cells A-K. Column L is a pretty straight forward formula to tell me if the store is doing better or worse that it's comparable quarter. The problem I am having is in Column M, N and O. I'm missing some condition because if column M turns positive the factor in column N will turn negative and therefore give the store a positive value which can't happen, it has to be a negative value.
[TABLE="width: 864"]
[TR]
[TD]COL A[/TD]
[TD]COL B[/TD]
[TD]COL C[/TD]
[TD]COL D[/TD]
[TD]COL E[/TD]
[TD]COL F[/TD]
[TD]COL G[/TD]
[TD]COL H[/TD]
[TD]COL I[/TD]
[TD]COL J [/TD]
[TD]COL K [/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] 470,835.30[/TD]
[TD] 436,847.15[/TD]
[TD] 401,435.36[/TD]
[TD] 1,309,117.80[/TD]
[TD][/TD]
[TD] 460,784.02[/TD]
[TD] 422,740.36[/TD]
[TD] 369,567.54[/TD]
[TD] 1,253,091.93[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[/TABLE]
This is raw data.
Formulas in renaming column l
[TABLE="width: 128"]
[TR]
[TD]
[TABLE="width: 158"]
[TR]
[TD]COL L [/TD]
[/TR]
[TR]
[TD]=IFERROR(F12/K12-1,0)
[TABLE="width: 90"]
[TR]
[TD]COL M[/TD]
[/TR]
[TR]
[TD]=(SUM($C$12:$E$971)-SUM($H$12:$J$971))/SUM($H$12:$J$971)
[TABLE="width: 80"]
[TR]
[TD]COL N[/TD]
[/TR]
[TR]
[TD]=IF(L12>0,0,IF(L12>M12,1,+L12/M12))
[TABLE="width: 306"]
[TR]
[TD]COL O[/TD]
[/TR]
[TR]
[TD]=IF(+L12<=-0.1,-0.1,IF(+N12*$O$3<=-0.1,L12,+N12*$O$3))
[TABLE="width: 200"]
[TR]
[TD]COL P[/TD]
[/TR]
[TR]
[TD]=+O12-$O$3[/TD]
[/TR]
[/TABLE]
Cell $O3 is -2.88%
If someone could please help.[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[TABLE="width: 864"]
[TR]
[TD]COL A[/TD]
[TD]COL B[/TD]
[TD]COL C[/TD]
[TD]COL D[/TD]
[TD]COL E[/TD]
[TD]COL F[/TD]
[TD]COL G[/TD]
[TD]COL H[/TD]
[TD]COL I[/TD]
[TD]COL J [/TD]
[TD]COL K [/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD] 470,835.30[/TD]
[TD] 436,847.15[/TD]
[TD] 401,435.36[/TD]
[TD] 1,309,117.80[/TD]
[TD][/TD]
[TD] 460,784.02[/TD]
[TD] 422,740.36[/TD]
[TD] 369,567.54[/TD]
[TD] 1,253,091.93[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[/TABLE]
This is raw data.
Formulas in renaming column l
[TABLE="width: 128"]
[TR]
[TD]
[TABLE="width: 158"]
[TR]
[TD]COL L [/TD]
[/TR]
[TR]
[TD]=IFERROR(F12/K12-1,0)
[TABLE="width: 90"]
[TR]
[TD]COL M[/TD]
[/TR]
[TR]
[TD]=(SUM($C$12:$E$971)-SUM($H$12:$J$971))/SUM($H$12:$J$971)
[TABLE="width: 80"]
[TR]
[TD]COL N[/TD]
[/TR]
[TR]
[TD]=IF(L12>0,0,IF(L12>M12,1,+L12/M12))
[TABLE="width: 306"]
[TR]
[TD]COL O[/TD]
[/TR]
[TR]
[TD]=IF(+L12<=-0.1,-0.1,IF(+N12*$O$3<=-0.1,L12,+N12*$O$3))
[TABLE="width: 200"]
[TR]
[TD]COL P[/TD]
[/TR]
[TR]
[TD]=+O12-$O$3[/TD]
[/TR]
[/TABLE]
Cell $O3 is -2.88%
If someone could please help.[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]
[/TD]
[/TR]
[/TABLE]