Combining / Reducing Multiple Formulas down to 1 Formula

GUYNOUK

New Member
Joined
Aug 30, 2023
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
In my spreadsheet I am struggling to combine the formulas in order to reduce the columns down.
The Sheet is attached. It's dynamic in that the calculations change if the value in L3 is changed.

The data in Column F (Change) is already availlable on another sheet that I can pull over. So Columns B to E are surplus to requirements and not required.
I want to combine columns G to L so I am left with 3 columns. (1) 'Date' (2) 'Change' (3) the combined G to L columns.
Is this possible?

Thanks

Dynamic-RSI.xlsx
ABCDEFGHIJKL
1STOCK NAME: XYZ
2DateOpenHighLowCloseChangeAdvanceDeclineAverage GainAverage LossRelative Strength (RS)RSI
35
41-Feb-167,589.507,600.457,541.257,555.95
52-Feb-167,566.657,576.307,428.057,455.55-100.400100.4    
63-Feb-167,392.457,419.407,350.307,361.80-93.75093.75    
74-Feb-167,411.457,457.057,365.957,404.0042.2042.20    
85-Feb-167,418.257,503.157,406.657,489.1085.1085.10    
98-Feb-167,489.707,512.557,363.207,387.25-101.850101.8525.4659.20.43006756830.07323411
109-Feb-167,303.957,323.457,275.157,298.20-89.05089.0520.36865.170.31253644323.81163927
1110-Feb-167,264.307,271.857,177.757,215.70-82.50082.516.294468.6360.23740311219.18559197
1211-Feb-167,203.607,208.656,959.956,976.35-239.350239.3513.03552102.77880.12683082511.25553386
1312-Feb-167,023.657,034.806,869.006,980.954.604.6011.34841682.223040.13801990312.12807461
1415-Feb-167,057.357,182.807,056.807,162.95182.00182045.478732865.7784320.69139277740.87712722
1516-Feb-167,201.257,204.657,037.707,048.25-114.700114.736.3829862475.56274560.48149370432.50055687
1617-Feb-167,058.857,123.706,960.657,108.4560.2060.2041.1463889960.450196480.68066592640.49977546
1718-Feb-167,177.407,215.107,127.857,191.7583.3083.3049.5771111948.360157181.02516439350.6212926
1819-Feb-167,170.557,226.857,145.957,210.7519.0019043.4616889538.688125751.12338574552.90540108
1922-Feb-167,208.857,252.407,200.707,234.5523.8023.8039.5293511630.95050061.27717970356.08603051
2023-Feb-167,240.307,241.707,090.707,109.55-125.00012531.6234809349.760400480.63551538.85717956
2124-Feb-167,075.007,090.807,009.757,018.70-90.85090.8525.2987847457.978320380.43634904530.3790396
2225-Feb-167,029.857,034.206,961.406,970.60-48.10048.120.239027856.002656310.36139406826.54588239
2326-Feb-167,039.307,052.906,985.107,029.7559.1559.15028.0212222444.802125040.62544404338.47834971
2429-Feb-167,050.457,094.606,825.806,987.05-42.70042.722.4169777944.381700040.50509506833.55901422
251-Mar-167,038.257,235.507,035.107,222.30235.25235.25064.9835822335.505360031.830247164.667396
262-Mar-167,321.707,380.357,308.157,368.85146.55146.55081.2968657928.404288022.86213355274.10757587
273-Mar-167,429.557,483.957,406.057,475.60106.75106.75086.3874926322.723430423.80169239679.17400955
284-Mar-167,505.407,505.907,444.107,485.359.759.75071.059994118.178744333.90896053179.62908861
298-Mar-167,486.407,527.157,442.157,485.30-0.0500.0556.8479952814.552995473.90627451379.61793623
309-Mar-167,436.107,539.007,424.307,531.8046.5046.5054.7783962311.642396374.70507913282.47175934
3110-Mar-167,545.357,547.107,447.407,486.15-45.65045.6543.8227169818.44391712.37599837170.37913263
3211-Mar-167,484.857,543.957,460.607,510.2024.0524.05039.8681735814.755133682.70198660772.98747656
3314-Mar-167,542.607,583.707,515.057,538.7528.5528.55037.6045388711.804106943.18571655276.10922795
3415-Mar-167,535.857,545.207,452.807,460.60-78.15078.1530.0836310925.073285551.19982804154.5419014
3516-Mar-167,457.057,508.007,405.157,498.7538.1538.15031.6969048820.058628441.58021297261.24350933
3617-Mar-167,557.407,585.307,479.407,512.5513.8013.8028.117523916.046902761.7522087863.66554721
3718-Mar-167,534.657,613.607,517.907,604.3591.8091.8040.8540191212.83752223.18239131176.09023342
3821-Mar-167,619.207,713.557,617.707,704.2599.9099.9052.663215310.270017765.12786019683.68108984
3922-Mar-167,695.557,728.207,643.807,714.9010.6510.65044.260572248.2160142115.38710999184.34346674
4023-Mar-167,717.457,726.857,670.607,716.501.601.6035.728457796.5728113685.43579539884.46190505
4128-Mar-167,741.007,749.407,587.707,615.10-101.400101.428.5827662325.538249091.11921401252.81269403
4229-Mar-167,606.557,652.907,582.257,597.00-18.10018.122.8662129924.050599280.95075439648.73778052
4330-Mar-167,651.107,741.957,643.457,735.20138.20138.2045.9329703919.240479422.38730903770.47804056
4431-Mar-167,727.657,777.607,702.007,738.403.203.2037.3863763115.392383542.42888804270.8360265
451-Apr-167,718.057,740.157,666.107,713.05-25.35025.3529.9091010517.383906831.7205051463.24212054
464-Apr-167,733.157,764.457,704.407,758.8045.7545.75033.0772808413.907125462.37844124870.40055083
475-Apr-167,736.307,736.307,588.657,603.20-155.600155.626.4618246742.245700370.62637912138.51372125
486-Apr-167,636.057,638.657,591.757,614.3511.1511.15023.3994597433.79656030.69236216740.91099297
497-Apr-167,630.407,630.757,535.857,546.45-67.90067.918.7195677940.617248240.46087730231.54798158
508-Apr-167,542.357,569.357,526.707,555.208.758.75016.7256542332.493798590.51473373333.98179637
5111-Apr-167,577.807,678.807,516.857,671.40116.20116.2036.6205233925.995038871.40875047658.48469943
5212-Apr-167,669.257,717.407,663.357,708.9537.5537.55036.8064187120.79603111.76987707663.89731484
5313-Apr-167,777.157,864.807,772.207,850.45141.50141.5057.7451349716.636824883.47092281177.63325286
5418-Apr-167,908.157,920.607,842.757,914.7064.2564.25059.0461079713.30945994.43640150781.60547931
5519-Apr-167,950.057,950.407,877.557,914.750.050.05047.2468863810.647567924.43734068981.60865656
5620-Apr-167,953.657,978.457,884.107,912.05-2.7002.737.79750919.0580543384.1728066280.66813485
5721-Apr-167,891.807,923.357,873.357,899.30-12.75012.7530.238007289.796443473.0866311275.5299666
Dynamic RSI
Cell Formulas
RangeFormula
F5:F57F5=E5-E4
G5:G57G5=IF(F5>0,F5,0)
H5:H57H5=IF(F5<0,-F5,0)
I5,I9:I57I5=IF((ROW()-4-$L$3)<0,"",IF((ROW()-4-$L$3)>0,((I4*($L$3-1))+G5)/$L$3,IF((ROW()-4-$L$3)=0,AVERAGE($G$5:INDIRECT("G"&ROW())))))
J5:J57J5=IF((ROW()-4-$L$3)<0,"",IF((ROW()-4-$L$3)>0,((J4*($L$3-1))+H5)/$L$3,IF((ROW()-4-$L$3)=0,AVERAGE($H$5:INDIRECT("H"&ROW())))))
K5:K57K5=IF((ROW()-4-$L$3)>=0,I5/J5,"")
L5:L57L5=IF((ROW()-4-$L$3)>=0,IF(J5=0,100,100-(100/(1+K5))),"")
I6:I8I6=IF((ROW()-4-$L$3)<0,"",IF((ROW()-4-$L$3)>0,((I5*($L$3-1))+G6)/$L$3,IF((ROW()-4-$L$3)=0,AVERAGE($G$5:INDIRECT("H"&ROW())))))
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Since you have a working worksheet. Why don't you just hide the columns with data that you do not need displayed?
Having the intermediate values could be useful if you ever have problems.

But, to answer your question ... "Yes" you could simplify the formula and eliminate columns if that is what want to do.
 
Upvote 0
Hi. Thanks for the reply. I did think of hiding the columns but I'll be expanding this sheet and am looking to rationalise .... but i'm struggling to get this into one formula.
 
Upvote 0
Hello:
I have been looking at your data and formula. Here is what I have concluded ...
Column K could be eliminated by doing the Column I/Column J division in your RSL column

Columns I and J are much harder to eliminate. That is because the formula changes.
These two columns appear to be a modified EMA calculation (Exponential Modified Average). It quite a bit of digging and looking at stock performance calculation to figure this out.

As the calculation title implies it is a smoothing formula and is dependent on previous calculations. The first values in columns I and J are based upon a simply Average calculation. In your sample data
the Average(Column G) and Average(Column H) are the values for Columns I and J for row 9 when the number of sample is set to 5 (in your sample data).

However, the calculation changes when the row number is 10 or greater to form of an EMA calculation (which is cumulative). It appears to give an exponential weight to previous values of Gains (Column G) and Losses (Column H). But, it is skewed by the initial average calculation in Row 9.

What I would suggest if you do not want to hide columns is put the calcuations for Columns I, J and K on a different sheet and reference their values in your formulas.

Would that be a workable solution for you?
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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