using a cell value in a formula

E

epiciocc

Is there a way to take the value that a formula provides to a cell an
use the returned value in another formula.
ie:
Say cell A3 has a formula that adds cell B5 thru B10.
How can I take the answer that would be displayed in A3
as a value in another formula?

Thanks,
Ed
 
E

epiciocc

Well, the A3 becomes part of an IF statement, I want to add the value
of the cell when my IF returns a false. The problem is the
it ignores the A3 value.

Thanks
 
J

JohnI in Brisbane

epiciocc,

Please post details of -

1) The value in A3
2) The IF formula you are using.

Then we may be able to see why it's not working.

regards,

JohnI
 
E

epiciocc

Cell b7 has this formula

=IF(B4="DC","0","1")

Cell h7 has this formula

=IF(H4="DC","0","1")

Cell A15 has this formula

=IF((B7="1")*(H7="1"),SUM(B7,H7),0)


This is a simplified version, there are more cells that perform
the b7 & h7 function.

Thanks,
Ed
 
J

JohnI in Brisbane

epiciocc,

I see 2 problems with your formulas.

1) Must use "AND" or "OR" for multiple conditions e.g.

=IF(AND(B7=1,H7=1),SUM(B7,H7),0)

2) You are trying to add text numbers with the SUM which won't work unless
you change

=IF(B4="DC",0,1)

=IF(H4="DC",0,1)

==============
If you want to add the text values, use the following formula

=IF(AND(B7=1,H7=1),B7+H7,0)


regards,

JohnI
 
E

epiciocc

The only change I had to make to the formula to get it to work properly
was to remove the SUM from the the true/false section of the IF formula
and use only the cell+cell+cell.
Thanks for your help,

Ed
 
J

JohnI in Brisbane

epiciocc,

Great to hear & thanks for letting me know how you went.

I checked again & you are right (of course).

The boolean evaluation of TRUE gives 1 for calculations, whereas FALSE gives
0.

Multiplying TRUE by TRUE gives TRUE ( 1 * 1 -> 1 )

Multiplying FALSE by FALSE gives FALSE. ( 0 * 0 -> 0 )

From a programming point of view, that can be harder to follow when AND is
more obvious.

In any case it works, and I'm glad you solved your problem.

regards,

JohnI
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top