Macros with basic formulas

mlarson

Well-known Member
Joined
Aug 25, 2011
Messages
509
Office Version
  1. 2010
Platform
  1. Windows
Hi all, if you know how to create macros for the following I would love your help. I would like to create two separate macros; one for columns D,E,F and one for G,H,I. The tables below provide my formulas and my desired results, respectively. As you can see, the formulas are very basic in all columns. I just don't know how to properly set up the macros so that I don't need to copy and paste the formula over thousands of cells. Note: the blank cells should remain blank because the output for those cells would otherwise produce error messages. Thank you.

FORMULAS
<table width="818" border="0" cellpadding="0" cellspacing="0"><col style="width: 33pt;" width="44"> <col style="width: 44pt;" width="58"> <col style="width: 42pt;" width="56"> <col style="width: 81pt;" width="108"> <col style="width: 74pt;" width="98"> <col style="width: 75pt;" width="100"> <col style="width: 92pt;" width="122"> <col style="width: 87pt;" width="116" span="2"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl63" style="height: 15pt; width: 33pt;" width="44" height="20">A</td> <td class="xl63" style="width: 44pt;" width="58">B</td> <td class="xl63" style="width: 42pt;" width="56">C</td> <td class="xl63" style="width: 81pt;" width="108">D</td> <td class="xl63" style="width: 74pt;" width="98">E</td> <td class="xl63" style="width: 75pt;" width="100">F</td> <td class="xl63" style="width: 92pt;" width="122">G</td> <td class="xl63" style="width: 87pt;" width="116">H</td> <td class="xl63" style="width: 87pt;" width="116">I</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">2</td> <td class="xl65">162.6</td> <td class="xl65">161.57</td> <td class="xl66">=LN(B2/C2)</td> <td class="xl66">
</td> <td class="xl66">
</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">3</td> <td class="xl65">164.49</td> <td class="xl65">163.3</td> <td class="xl66">=LN(B3/C3)</td> <td class="xl66">=LN(B3/C2)</td> <td class="xl66">=LN(C3/C2)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">4</td> <td class="xl65">164.75</td> <td class="xl65">163.02</td> <td class="xl66">=LN(B4/C4)</td> <td class="xl66">=LN(B4/C3)</td> <td class="xl66">=LN(C4/C3)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">5</td> <td class="xl65">163.92</td> <td class="xl65">157.47</td> <td class="xl66">=LN(B5/C5)</td> <td class="xl66">=LN(B5/C4)</td> <td class="xl66">=LN(C5/C4)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">6</td> <td class="xl65">157.26</td> <td class="xl65">158.99</td> <td class="xl66">=LN(B6/C6)</td> <td class="xl66">=LN(B6/C5)</td> <td class="xl66">=LN(C6/C5)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">7</td> <td class="xl65">158.51</td> <td class="xl65">156.98</td> <td class="xl66">=LN(B7/C7)</td> <td class="xl66">=LN(B7/C6)</td> <td class="xl66">=LN(C7/C6)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">8</td> <td class="xl65">156.2</td> <td class="xl65">154.48</td> <td class="xl66">=LN(B8/C8)</td> <td class="xl66">=LN(B8/C7)</td> <td class="xl66">=LN(C8/C7)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">9</td> <td class="xl65">154.48</td> <td class="xl65">156.67</td> <td class="xl66">=LN(B9/C9)</td> <td class="xl66">=LN(B9/C8)</td> <td class="xl66">=LN(C9/C8)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">10</td> <td class="xl65">156.29</td> <td class="xl65">158.01</td> <td class="xl66">=LN(B10/C10)</td> <td class="xl66">=LN(B10/C9)</td> <td class="xl66">=LN(C10/C9)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">11</td> <td class="xl65">158.94</td> <td class="xl65">158.71</td> <td class="xl66">=LN(B11/C11)</td> <td class="xl66">=LN(B11/C10)</td> <td class="xl66">=LN(C11/C10)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">12</td> <td class="xl65">158.2</td> <td class="xl65">161.28</td> <td class="xl66">=LN(B12/C12)</td> <td class="xl66">=LN(B12/C11)</td> <td class="xl66">=LN(C12/C11)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">13</td> <td class="xl65">162.3</td> <td class="xl65">157.1</td> <td class="xl66">=LN(B13/C13)</td> <td class="xl66">=LN(B13/C12)</td> <td class="xl66">=LN(C13/C12)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">14</td> <td class="xl65">157.45</td> <td class="xl65">154.54</td> <td class="xl66">=LN(B14/C14)</td> <td class="xl66">=LN(B14/C13)</td> <td class="xl66">=LN(C14/C13)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">15</td> <td class="xl65">154.99</td> <td class="xl65">155.65</td> <td class="xl66">=LN(B15/C15)</td> <td class="xl66">=LN(B15/C14)</td> <td class="xl66">=LN(C15/C14)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">16</td> <td class="xl65">156.02</td> <td class="xl65">162.84</td> <td class="xl66">=LN(B16/C16)</td> <td class="xl66">=LN(B16/C15)</td> <td class="xl66">=LN(C16/C15)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">17</td> <td class="xl65">159.92</td> <td class="xl65">155.04</td> <td class="xl66">=LN(B17/C17)</td> <td class="xl66">=LN(B17/C16)</td> <td class="xl66">=LN(C17/C16)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">18</td> <td class="xl65">155.37</td> <td class="xl65">150.56</td> <td class="xl66">=LN(B18/C18)</td> <td class="xl66">=LN(B18/C17)</td> <td class="xl66">=LN(C18/C17)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">19</td> <td class="xl65">150.88</td> <td class="xl65">152.15</td> <td class="xl66">=LN(B19/C19)</td> <td class="xl66">=LN(B19/C18)</td> <td class="xl66">=LN(C19/C18)</td> <td class="xl63">
</td> <td class="xl63">
</td> <td class="xl63">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">20</td> <td class="xl65">153.88</td> <td class="xl65">156.83</td> <td class="xl66">=LN(B20/C20)</td> <td class="xl66">=LN(B20/C19)</td> <td class="xl66">=LN(C20/C19)</td> <td class="xl66">
</td> <td class="xl66">
</td> <td class="xl66">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">21</td> <td class="xl65">156.99</td> <td class="xl65">158.32</td> <td class="xl66">=LN(B21/C21)</td> <td class="xl66">=LN(B21/C20)</td> <td class="xl66">=LN(C21/C20)</td> <td class="xl66">=STDEV(D2:D21)</td> <td class="xl66">
</td> <td class="xl66">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">22</td> <td class="xl65">157.32</td> <td class="xl65">158.8</td> <td class="xl66">=LN(B22/C22)</td> <td class="xl66">=LN(B22/C21)</td> <td class="xl66">=LN(C22/C21)</td> <td class="xl66">=STDEV(D3:D22)</td> <td class="xl66">=STDEV(E3:E22)</td> <td class="xl66">=STDEV(F3:F22)</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">23</td> <td class="xl65">154.99</td> <td class="xl65">155.65</td> <td class="xl66">=LN(B23/C23)</td> <td class="xl66">=LN(B23/C22)</td> <td class="xl66">=LN(C23/C22)</td> <td class="xl66">=STDEV(D4:D23)</td> <td class="xl66">=STDEV(E4:E23)</td> <td class="xl66">=STDEV(F4:F23)</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">24</td> <td class="xl65">156.02</td> <td class="xl65">162.84</td> <td class="xl66">=LN(B24/C24)</td> <td class="xl66">=LN(B24/C23)</td> <td class="xl66">=LN(C24/C23)</td> <td class="xl66">=STDEV(D5:D24)</td> <td class="xl66">=STDEV(E5:E24)</td> <td class="xl66">=STDEV(F5:F24)</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">25</td> <td class="xl65">159.92</td> <td class="xl65">155.04</td> <td class="xl66">=LN(B25/C25)</td> <td class="xl66">=LN(B25/C24)</td> <td class="xl66">=LN(C25/C24)</td> <td class="xl66">=STDEV(D6:D25)</td> <td class="xl66">=STDEV(E6:E25)</td> <td class="xl66">=STDEV(F6:F25)</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">26</td> <td class="xl65">155.37</td> <td class="xl65">150.56</td> <td class="xl66">=LN(B26/C26)</td> <td class="xl66">=LN(B26/C25)</td> <td class="xl66">=LN(C26/C25)</td> <td class="xl66">=STDEV(D7:D26)</td> <td class="xl66">=STDEV(E7:E26)</td> <td class="xl66">=STDEV(F7:F26)</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl64" style="height: 15pt;" height="20">27</td> <td class="xl65">158.2</td> <td class="xl65">161.28</td> <td class="xl66">=LN(B27/C27)</td> <td class="xl66">=LN(B27/C26)</td> <td class="xl66">=LN(C27/C26)</td> <td class="xl66">=STDEV(D8:D27)</td> <td class="xl66">=STDEV(E8:E27)</td> <td class="xl66">=STDEV(F8:F27)</td> </tr> </tbody></table>

DESIRED RESULTS
<table width="818" border="0" cellpadding="0" cellspacing="0"><col style="width: 33pt;" width="44"> <col style="width: 44pt;" width="58"> <col style="width: 42pt;" width="56"> <col style="width: 81pt;" width="108"> <col style="width: 74pt;" width="98"> <col style="width: 75pt;" width="100"> <col style="width: 92pt;" width="122"> <col style="width: 87pt;" width="116" span="2"> <tbody><tr style="height: 15pt;" height="20"> <td class="xl65" style="height: 15pt; width: 33pt;" width="44" height="20">A</td> <td class="xl65" style="width: 44pt;" width="58">B</td> <td class="xl65" style="width: 42pt;" width="56">C</td> <td class="xl65" style="width: 81pt;" width="108">D</td> <td class="xl65" style="width: 74pt;" width="98">E</td> <td class="xl65" style="width: 75pt;" width="100">F</td> <td class="xl65" style="width: 92pt;" width="122">G</td> <td class="xl65" style="width: 87pt;" width="116">H</td> <td class="xl65" style="width: 87pt;" width="116">I</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">2</td> <td class="xl67">162.6</td> <td class="xl67">161.57</td> <td class="xl68">0.0064</td> <td class="xl68">
</td> <td class="xl68">
</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">3</td> <td class="xl67">164.49</td> <td class="xl67">163.3</td> <td class="xl68">0.0073</td> <td class="xl68">0.0179</td> <td class="xl68">0.0107</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">4</td> <td class="xl67">164.75</td> <td class="xl67">163.02</td> <td class="xl68">0.0106</td> <td class="xl68">0.0088</td> <td class="xl68">-0.0017</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">5</td> <td class="xl67">163.92</td> <td class="xl67">157.47</td> <td class="xl68">0.0401</td> <td class="xl68">0.0055</td> <td class="xl68">-0.0346</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">6</td> <td class="xl67">157.26</td> <td class="xl67">158.99</td> <td class="xl68">-0.0109</td> <td class="xl68">-0.0013</td> <td class="xl68">0.0096</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">7</td> <td class="xl67">158.51</td> <td class="xl67">156.98</td> <td class="xl68">0.0097</td> <td class="xl68">-0.003</td> <td class="xl68">-0.0127</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">8</td> <td class="xl67">156.2</td> <td class="xl67">154.48</td> <td class="xl68">0.0111</td> <td class="xl68">-0.005</td> <td class="xl68">-0.0161</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">9</td> <td class="xl67">154.48</td> <td class="xl67">156.67</td> <td class="xl68">-0.0141</td> <td class="xl68">0</td> <td class="xl68">0.0141</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">10</td> <td class="xl67">156.29</td> <td class="xl67">158.01</td> <td class="xl68">-0.0109</td> <td class="xl68">-0.0024</td> <td class="xl68">0.0085</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">11</td> <td class="xl67">158.94</td> <td class="xl67">158.71</td> <td class="xl68">0.0014</td> <td class="xl68">0.0059</td> <td class="xl68">0.0044</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">12</td> <td class="xl67">158.2</td> <td class="xl67">161.28</td> <td class="xl68">-0.0193</td> <td class="xl68">-0.0032</td> <td class="xl68">0.0161</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">13</td> <td class="xl67">162.3</td> <td class="xl67">157.1</td> <td class="xl68">0.0326</td> <td class="xl68">0.0063</td> <td class="xl68">-0.0263</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">14</td> <td class="xl67">157.45</td> <td class="xl67">154.54</td> <td class="xl68">0.0187</td> <td class="xl68">0.0022</td> <td class="xl68">-0.0164</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">15</td> <td class="xl67">154.99</td> <td class="xl67">155.65</td> <td class="xl68">-0.0042</td> <td class="xl68">0.0029</td> <td class="xl68">0.0072</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">16</td> <td class="xl67">156.02</td> <td class="xl67">162.84</td> <td class="xl68">-0.0428</td> <td class="xl68">0.0024</td> <td class="xl68">0.0452</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">17</td> <td class="xl67">159.92</td> <td class="xl67">155.04</td> <td class="xl68">0.031</td> <td class="xl68">-0.0181</td> <td class="xl68">-0.0491</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">18</td> <td class="xl67">155.37</td> <td class="xl67">150.56</td> <td class="xl68">0.0314</td> <td class="xl68">0.0021</td> <td class="xl68">-0.0293</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">19</td> <td class="xl67">150.88</td> <td class="xl67">152.15</td> <td class="xl68">-0.0084</td> <td class="xl68">0.0021</td> <td class="xl68">0.0105</td> <td class="xl65">
</td> <td class="xl65">
</td> <td class="xl65">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">20</td> <td class="xl67">153.88</td> <td class="xl67">156.83</td> <td class="xl68">-0.019</td> <td class="xl68">0.0113</td> <td class="xl68">0.0303</td> <td class="xl68">
</td> <td class="xl68">
</td> <td class="xl68">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">21</td> <td class="xl67">156.99</td> <td class="xl67">158.32</td> <td class="xl68">-0.0084</td> <td class="xl68">0.001</td> <td class="xl68">0.0095</td> <td class="xl68">0.021</td> <td class="xl68">
</td> <td class="xl68">
</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">22</td> <td class="xl67">157.32</td> <td class="xl67">158.8</td> <td class="xl68">-0.0094</td> <td class="xl68">-0.0063</td> <td class="xl68">0.003</td> <td class="xl68">0.0211</td> <td class="xl68">0.0074</td> <td class="xl68">0.0227</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">23</td> <td class="xl67">154.99</td> <td class="xl67">155.65</td> <td class="xl68">-0.0042</td> <td class="xl68">-0.0243</td> <td class="xl68">-0.02</td> <td class="xl68">0.0212</td> <td class="xl68">0.0084</td> <td class="xl68">0.0229</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">24</td> <td class="xl67">156.02</td> <td class="xl67">162.84</td> <td class="xl68">-0.0428</td> <td class="xl68">0.0024</td> <td class="xl68">0.0452</td> <td class="xl68">0.0232</td> <td class="xl68">0.0081</td> <td class="xl68">0.0253</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">25</td> <td class="xl67">159.92</td> <td class="xl67">155.04</td> <td class="xl68">0.031</td> <td class="xl68">-0.0181</td> <td class="xl68">-0.0491</td> <td class="xl68">0.0225</td> <td class="xl68">0.0088</td> <td class="xl68">0.0265</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">26</td> <td class="xl67">155.37</td> <td class="xl67">150.56</td> <td class="xl68">0.0314</td> <td class="xl68">0.0021</td> <td class="xl68">-0.0293</td> <td class="xl68">0.0235</td> <td class="xl68">0.0089</td> <td class="xl68">0.0271</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl66" style="height: 15pt;" height="20">27</td> <td class="xl67">158.2</td> <td class="xl67">161.28</td> <td class="xl68">-0.0193</td> <td class="xl68">0.0495</td> <td class="xl68">0.0688</td> <td class="xl68">0.0238</td> <td class="xl68">0.0145</td> <td class="xl68">0.0313</td> </tr> </tbody></table>
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Which Excel version you are using for this sheet ?

As I believe we don't need to have macro in place for this task.

We can do it by some other simple techniques...

Vimal
 
Upvote 0
Which Excel version you are using for this sheet ?

As I believe we don't need to have macro in place for this task.

We can do it by some other simple techniques...

Vimal

Vimal, I am using Excel 2010. What other simple technique did you have in mind? Thanks.
 
Upvote 0
If I was writing a macro, I'd use the two R1C1 formulas =LN(RC2/R[-1]C3) and =STDEV(R[-19]C4:RC4)

mikerickson, do you mind sharing what that macro would look like? I'm not good at taking a formula and turning it into a macro.
 
Upvote 0
Code:
Range("D2:F27").FormulaR1C1 = "=LN(RC2/R[-1]C3)
Range("G21:I27").FormulaR1C1 = "=STDEV(R[-19]C4:RC4)"
Range("D2:I27").Value = Range("D2:I27").Value
 
Upvote 0

Forum statistics

Threads
1,224,548
Messages
6,179,445
Members
452,915
Latest member
hannnahheileen

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