TRUE/FALSE function in IF statement

C

Caelan Aegana

This is pretty self-explanatory what I'm doing, but I don't know why I keep
getting a #NAME? error. Please help!

I tried various forms of the following formula:

=IF(EXACT(A2,A3), AVERAGE(A2:A3), 0)

where A2 and A3 contain identical words to test how a function returning
TRUE/FALSE would work in an IF statement I have tried setting the logical
test to =TRUE, ="TRUE", etc. and keep getting the error. Since the logical
test is just something that returns TRUE/FALSE, I do not see why the IF
function is having problems digesting it.

Can someone explain to me why this doesn't work and how to correct it?
(This is not the kind of circumstance where I could use COUNTIF, EXACT, etc.,
if that's what you would suggest).

Thanks
 
M

Max

Just some thoughts ..

Since A2:A3 contains words,
what do you expect: AVERAGE(A2:A3) to evaluate to?

If you're comparing real numbers, then:
=IF(A2=A3, AVERAGE(A2:A3), 0)

If you're comparing numbers but you're not sure whether these could be a mix
of text numbers/real numbers, then:
=IF(A2+0=A3+0, AVERAGE(A2:A3), 0)
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:16,000 Files:354 Subscribers:53
xdemechanik
 

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