ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need Help With ARRAY Formula (https://www.excelbanter.com/excel-worksheet-functions/37134-need-help-array-formula.html)

cummingse

Need Help With ARRAY Formula
 

1. During a four-week period, you worked the following hours, Week 1
(36
3/8 hr), Week 2 (41 1/4 hr), Week 3 (41 1/2 hr) and Week 4 (38 3/8 hr).
What
is the
average number of hours you worked in one week.

A 38 1/4 A FALSE
B 38 3/4
C 38 1/8
D 39 3/8
I have created a ARRAY Formula that if you select the wrong answer

it
retuns False, and if you select the correct answer it retuns True, But
the
problems is when the named cell (ANS) is blank it retuns FALSE, and I
would
like it to be Blank (Empty). What do I need to add to this formula to
make
it show an empty cell when named cell ANS is empty.

{=IF(ANS=ANSD."True",IF(ANS=ANSA,"False",IF(ANS=AN SB,"False",IF(ANS=ANSC,"False"))))}
Once again thanks a million for your time and help



--
cummingse
------------------------------------------------------------------------
cummingse's Profile: http://www.excelforum.com/member.php...o&userid=25611
View this thread: http://www.excelforum.com/showthread...hreadid=390230


Bernie Deitrick

How about this - all those extra "False" returns aren't needed, nor does it need to be array
entered:

=IF(ANS="","",IF(ANS=ANSD,"True","False"))

HTH,
Bernie
MS Excel MVP


"cummingse" wrote in message
...

1. During a four-week period, you worked the following hours, Week 1
(36
3/8 hr), Week 2 (41 1/4 hr), Week 3 (41 1/2 hr) and Week 4 (38 3/8 hr).
What
is the
average number of hours you worked in one week.

A 38 1/4 A FALSE
B 38 3/4
C 38 1/8
D 39 3/8
I have created a ARRAY Formula that if you select the wrong answer

it
retuns False, and if you select the correct answer it retuns True, But
the
problems is when the named cell (ANS) is blank it retuns FALSE, and I
would
like it to be Blank (Empty). What do I need to add to this formula to
make
it show an empty cell when named cell ANS is empty.

{=IF(ANS=ANSD."True",IF(ANS=ANSA,"False",IF(ANS=AN SB,"False",IF(ANS=ANSC,"False"))))}
Once again thanks a million for your time and help



--
cummingse
------------------------------------------------------------------------
cummingse's Profile: http://www.excelforum.com/member.php...o&userid=25611
View this thread: http://www.excelforum.com/showthread...hreadid=390230





All times are GMT +1. The time now is 11:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com