Based on a question in a different forum, I was trying to see if I could
figure out the answer using some of the new techniques I've seen on these
forums. I wrote the following formula, which I can't seem to get to work,
although using F9 to calculate parts of the formula seem to indicate it
should work. Can someone point me in the right direction, assuming what I am
trying is possible.
My formula is:
=SUM(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;))
In cells G10, J10, M10, and P10 I have valuse of 100, 200, 300, and 400
respectively.
CHAR({7, 10, 13, 16} 64) amp; quot;10quot; processed with F9 gives
{quot;G10quot;,quot;J10quot;,quot;M10quot;,quot;P10quot;}.
Then if I press F9 on INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;), I get
{100,200,300,400}. So now my formula is =SUM({100,200,300,400}). If I enter
this formula in another cell, I get 1000. However, if I use the original
formula, no matter whether I enter it normally or as an array formula, I get
100. What's up with that?
This appears to be the step that it is failing on as it returns 100, but I
don't know how to fix it or if it is doable:
=SUM(INDIRECT({quot;g10quot;,quot;j10quot;,quot;m10quot;,quot;p10quot;}))
Can anyone shed any light as to if this is doable like this and if so, what
I need to change in order to make it work? Thanks.
Use
=SUM(N(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;)))
or if you just want to sum every third cell from G10 to P10
=SUMPRODUCT(--(MOD(COLUMN(G10:P10),3)=1),G10:P10)
--
Regards,
Peo Sjoblom
quot;Kleevquot; gt; wrote in message
...
gt; Based on a question in a different forum, I was trying to see if I could
gt; figure out the answer using some of the new techniques I've seen on these
gt; forums. I wrote the following formula, which I can't seem to get to work,
gt; although using F9 to calculate parts of the formula seem to indicate it
gt; should work. Can someone point me in the right direction, assuming what I
am
gt; trying is possible.
gt; My formula is:
gt; =SUM(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;))
gt;
gt; In cells G10, J10, M10, and P10 I have valuse of 100, 200, 300, and 400
gt; respectively.
gt;
gt; CHAR({7, 10, 13, 16} 64) amp; quot;10quot; processed with F9 gives
gt; {quot;G10quot;,quot;J10quot;,quot;M10quot;,quot;P10quot;}.
gt;
gt; Then if I press F9 on INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;), I get
gt; {100,200,300,400}. So now my formula is =SUM({100,200,300,400}). If I
enter
gt; this formula in another cell, I get 1000. However, if I use the original
gt; formula, no matter whether I enter it normally or as an array formula, I
get
gt; 100. What's up with that?
gt;
gt; This appears to be the step that it is failing on as it returns 100, but I
gt; don't know how to fix it or if it is doable:
gt; =SUM(INDIRECT({quot;g10quot;,quot;j10quot;,quot;m10quot;,quot;p10quot;}))
gt;
gt; Can anyone shed any light as to if this is doable like this and if so,
what
gt; I need to change in order to make it work? Thanks.
I appreciate the response. If it won't work the way I originally had it or
with a slight variation thereof, then it won't work. In my opinion, using
the individual Indirect's is too unwieldy and defeats the purpose of my
trying to use them in this way. But thanks.
The following formula is probably what I would have come up with had I
gotten my original formula to work:
=SUMIF(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;),quot;
gt;=4quot;,(INDIRECT(CHAR({7,10,13,16} 64) amp;
quot;10quot;)))/COUNTIF(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;), quot;gt;=4quot;)
The OP in the other forum (General Questions) was asking for a way to
calculate an average based on the cell to its right being gt;= 4 (or something
along those lines.)
That seems (to me) to be close, but the answer is 0 (which I know is not
right.)quot;William Hortonquot; wrote:
gt; I believe your CHAR function is returning an array. If you highlite 4
gt; adjacent cells when you type your formla and then enter it with
gt; control-shift-enter you will get 100, 200, 300, and 400 in those 4 cells. If
gt; you want the answer in just one cell I think you will have to make one
gt; indirect formula for each cell you are adding.
gt;
gt; Try this formula:
gt; =SUM(INDIRECT(CHAR(71)amp;quot;10quot;),INDIRECT(CHAR(74)amp;quot;10 quot;),INDIRECT(CHAR(77)amp;quot;10quot;),INDIRECT(CHAR(80)amp;quot;10quot;) )
gt;
gt; Hope this helps.
gt;
gt; Thanks,
gt; Bill Horton
gt;
gt; quot;Kleevquot; wrote:
gt;
gt; gt; Based on a question in a different forum, I was trying to see if I could
gt; gt; figure out the answer using some of the new techniques I've seen on these
gt; gt; forums. I wrote the following formula, which I can't seem to get to work,
gt; gt; although using F9 to calculate parts of the formula seem to indicate it
gt; gt; should work. Can someone point me in the right direction, assuming what I am
gt; gt; trying is possible.
gt; gt; My formula is:
gt; gt; =SUM(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;))
gt; gt;
gt; gt; In cells G10, J10, M10, and P10 I have valuse of 100, 200, 300, and 400
gt; gt; respectively.
gt; gt;
gt; gt; CHAR({7, 10, 13, 16} 64) amp; quot;10quot; processed with F9 gives
gt; gt; {quot;G10quot;,quot;J10quot;,quot;M10quot;,quot;P10quot;}.
gt; gt;
gt; gt; Then if I press F9 on INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;), I get
gt; gt; {100,200,300,400}. So now my formula is =SUM({100,200,300,400}). If I enter
gt; gt; this formula in another cell, I get 1000. However, if I use the original
gt; gt; formula, no matter whether I enter it normally or as an array formula, I get
gt; gt; 100. What's up with that?
gt; gt;
gt; gt; This appears to be the step that it is failing on as it returns 100, but I
gt; gt; don't know how to fix it or if it is doable:
gt; gt; =SUM(INDIRECT({quot;g10quot;,quot;j10quot;,quot;m10quot;,quot;p10quot;}))
gt; gt;
gt; gt; Can anyone shed any light as to if this is doable like this and if so, what
gt; gt; I need to change in order to make it work? Thanks.
I believe your CHAR function is returning an array. If you highlite 4
adjacent cells when you type your formla and then enter it with
control-shift-enter you will get 100, 200, 300, and 400 in those 4 cells. If
you want the answer in just one cell I think you will have to make one
indirect formula for each cell you are adding.
Try this formula:
=SUM(INDIRECT(CHAR(71)amp;quot;10quot;),INDIRECT(CHAR(74)amp;quot;10 quot;),INDIRECT(CHAR(77)amp;quot;10quot;),INDIRECT(CHAR(80)amp;quot;10quot;) )
Hope this helps.
Thanks,
Bill Horton
quot;Kleevquot; wrote:
gt; Based on a question in a different forum, I was trying to see if I could
gt; figure out the answer using some of the new techniques I've seen on these
gt; forums. I wrote the following formula, which I can't seem to get to work,
gt; although using F9 to calculate parts of the formula seem to indicate it
gt; should work. Can someone point me in the right direction, assuming what I am
gt; trying is possible.
gt; My formula is:
gt; =SUM(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;))
gt;
gt; In cells G10, J10, M10, and P10 I have valuse of 100, 200, 300, and 400
gt; respectively.
gt;
gt; CHAR({7, 10, 13, 16} 64) amp; quot;10quot; processed with F9 gives
gt; {quot;G10quot;,quot;J10quot;,quot;M10quot;,quot;P10quot;}.
gt;
gt; Then if I press F9 on INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;), I get
gt; {100,200,300,400}. So now my formula is =SUM({100,200,300,400}). If I enter
gt; this formula in another cell, I get 1000. However, if I use the original
gt; formula, no matter whether I enter it normally or as an array formula, I get
gt; 100. What's up with that?
gt;
gt; This appears to be the step that it is failing on as it returns 100, but I
gt; don't know how to fix it or if it is doable:
gt; =SUM(INDIRECT({quot;g10quot;,quot;j10quot;,quot;m10quot;,quot;p10quot;}))
gt;
gt; Can anyone shed any light as to if this is doable like this and if so, what
gt; I need to change in order to make it work? Thanks.
Thank you very much. You answered my question, and I was able to adapt one
of your solutions (after much time and toil) to do what I had originally set
out to do. However, I don't think my answer ends up being any better than
what the OP on the other forum started with, so will not post this answer
there. But what I finally came up with is:
=IF(SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4, 1, 0))=0,0,
SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4,
N(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;)),
0))/SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4, 1, 0)))
Probably could be much simplified, but I feel lucky to have gotten this to
work.quot;Peo Sjoblomquot; wrote:
gt; Use
gt;
gt; =SUM(N(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;)))
gt;
gt; or if you just want to sum every third cell from G10 to P10
gt;
gt; =SUMPRODUCT(--(MOD(COLUMN(G10:P10),3)=1),G10:P10)
gt;
gt;
gt;
gt; --
gt;
gt; Regards,
gt;
gt; Peo Sjoblom
gt;
gt; quot;Kleevquot; gt; wrote in message
gt; ...
gt; gt; Based on a question in a different forum, I was trying to see if I could
gt; gt; figure out the answer using some of the new techniques I've seen on these
gt; gt; forums. I wrote the following formula, which I can't seem to get to work,
gt; gt; although using F9 to calculate parts of the formula seem to indicate it
gt; gt; should work. Can someone point me in the right direction, assuming what I
gt; am
gt; gt; trying is possible.
gt; gt; My formula is:
gt; gt; =SUM(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;))
gt; gt;
gt; gt; In cells G10, J10, M10, and P10 I have valuse of 100, 200, 300, and 400
gt; gt; respectively.
gt; gt;
gt; gt; CHAR({7, 10, 13, 16} 64) amp; quot;10quot; processed with F9 gives
gt; gt; {quot;G10quot;,quot;J10quot;,quot;M10quot;,quot;P10quot;}.
gt; gt;
gt; gt; Then if I press F9 on INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;), I get
gt; gt; {100,200,300,400}. So now my formula is =SUM({100,200,300,400}). If I
gt; enter
gt; gt; this formula in another cell, I get 1000. However, if I use the original
gt; gt; formula, no matter whether I enter it normally or as an array formula, I
gt; get
gt; gt; 100. What's up with that?
gt; gt;
gt; gt; This appears to be the step that it is failing on as it returns 100, but I
gt; gt; don't know how to fix it or if it is doable:
gt; gt; =SUM(INDIRECT({quot;g10quot;,quot;j10quot;,quot;m10quot;,quot;p10quot;}))
gt; gt;
gt; gt; Can anyone shed any light as to if this is doable like this and if so,
gt; what
gt; gt; I need to change in order to make it work? Thanks.
gt;
gt;
gt;
On second thought, since you wouldn't be able to copy that and have it change
based on what row you were on, I made the following modification to it.
=IF(SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; ROW())) gt;= 4, 1, 0))=0,0,
SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; ROW())) gt;= 4,
N(INDIRECT(CHAR({7,10,13,16} 64) amp; ROW())),
0))/SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; ROW())) gt;= 4, 1, 0)))
quot;Kleevquot; wrote:
gt; Thank you very much. You answered my question, and I was able to adapt one
gt; of your solutions (after much time and toil) to do what I had originally set
gt; out to do. However, I don't think my answer ends up being any better than
gt; what the OP on the other forum started with, so will not post this answer
gt; there. But what I finally came up with is:
gt;
gt; =IF(SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4, 1, 0))=0,0,
gt; SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4,
gt; N(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;)),
gt; 0))/SUM(IF(N(INDIRECT(CHAR({7,10,13,16} 64 1) amp; quot;10quot;)) gt;= 4, 1, 0)))
gt;
gt; Probably could be much simplified, but I feel lucky to have gotten this to
gt; work.
gt;
gt;
gt; quot;Peo Sjoblomquot; wrote:
gt;
gt; gt; Use
gt; gt;
gt; gt; =SUM(N(INDIRECT(CHAR({7,10,13,16} 64) amp; quot;10quot;)))
gt; gt;
gt; gt; or if you just want to sum every third cell from G10 to P10
gt; gt;
gt; gt; =SUMPRODUCT(--(MOD(COLUMN(G10:P10),3)=1),G10:P10)
gt; gt;
gt; gt;
gt; gt;
gt; gt; --
gt; gt;
gt; gt; Regards,
gt; gt;
gt; gt; Peo Sjoblom
- May 16 Wed 2007 20:37
Making this formula work
close
全站熱搜
留言列表
發表留言