Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - And Function Returns 0 instead of True or False

Status
Not open for further replies.

dwichmann

IS-IT--Management
Jul 15, 2005
42
GB
I am using the following function to calculate something called compound deflection in my spreadsheet

=(DEGREES('Upright calc'!C$24/CALCULATION!C$141)*1.5) + (DEGREES(H25/D$15)*1.5)

This part works fine and will give me a number ranging from between 0 and 30

I then have an And function that references a number of cells and returns a true or false. This also works well until i ask the And function to reference the result of the formula above. When i do this it returns the value 0 instead of True or False. Has anyone come across anything like this before?
 
Probably a boolean value being co-erced into a number because your DEGREES formula will produce a number

0=FALSE
1=TRUE

Can't really confirm unless you post the AND formula that is giving you the trouble...

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
thanks geoff

my AND formula is just

=AND(G25<1,J25>180,I25<1) where I25 is the result of the degree formula
 
Think you are getting a co-ercion as mentioned

Do the results (1 or 0) tie back to the true / false ?

If so, all you need to do is view 1 as true and 0 as false

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Hi dwinchmann:

How about a little clarification -- how are you using your formulation using the AND function and your formulation for compound deflection calculation -- the two formulas in comcombination ... please post the combined formulation along with your expected result, and then let us take it from there.

Yogi Anand, D.Eng, P.E.
Energy Efficient Building Network LLC
 
hi all, thanks for your help but the problem seems to have corrected itself. A very strange problem indeed. The 0's and 1's were only ever 0's so they didnt translate to true or false. As i said i have gone in this morning and the issue is now reporting true or false. Nothing has been changed it just works. I have no idea?????
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top