Wednesday, December 26, 2012

yogi_SetUp Formula For Computing Values For Being Early OnTime or Late

                                          Google Spreadsheet   Post  #942
Yogi Anand, D.Eng, P.E.      ANAND Enterprises LLC -- Rochester Hills MI    Dec 26, 2012
user moses004 said:(!category-topic/docs/spreadsheets/M6_LewvcuD4)
Can you tell me what's wrong with this formula?
I'm using a Dell laptop, Chrome browser.

Here's the formula:

=IF(C2="Early",100,IF(C2="On time",75,IF(C2="Late",50)))

The only part of it that works is the first option for 100. I have a validation list in C2: Easy, On time, Late. When I choose Early, I get 100 in the correct cell. I get nothing when I select "On Time" or "Late."

Thank you.

Joe Moses
the problem was that some entries in user's dataValidation list included a leading space character ... so one way would have been to remove those leading unwanted space characters ... however, since this is a common error that is bound to happen, a passive approach is to account for this in the associated formula using the TRIM function

I have also included in the solution a single arrayformula for an array of values