![]() |
TRUE/FALSE function in IF statement
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 |
TRUE/FALSE function in IF statement
That doesn't return #NAME ere, but why would you want to average text?
-- __________________________________ HTH Bob "Caelan Aegana" <Caelan wrote in message ... 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 |
TRUE/FALSE function in IF statement
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 --- "Caelan Aegana" wrote: 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 |
All times are GMT +1. The time now is 03:29 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com