English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

=IF(A2="Monday","9", "NA")
Im trying to work this out but this isnt working for me - i want to see if A2="Monday" "Tuesday" "Wednesday" "Thursday" "Friday" or "Saturday" return "9"..... and if A2="Sunday" return "10".
This formula (=IF(A2="Monday","9", "NA") is working. but when i put more this one days inside, it stops working. is there a way to do that?
any help will me good.

2007-10-01 13:01:08 · 4 answers · asked by Anonymous in Computers & Internet Programming & Design

i think its called Multi IFs

2007-10-01 13:02:42 · update #1

4 answers

you can use OR e.g.
=IF(OR(A2="Monday",A2="Tuesday", A2="Wednesday", A2="Thursday", A2="Friday",A2="Saturday"),"9","NA")

but considering the data we have here I would rather use opposite approach using AND:

=IF(AND(A2<>"",A2<>"Sunday"),"9","NA")

Hope this helps

2007-10-01 13:53:52 · answer #1 · answered by Tom 5 · 2 0

You could easily do that with one simple formula:

=IF(A2 = "Sunday", 10 , 9)

This sets your value to 10 if A2 equals Sunday, otherwise for all other values (Monday-Saturday) your value is 9.

There is only one problem with this formula and that is you could put the word "Blue" or any other value besides Sunday in for A2 and the formula would return 9.

You could layer a second if in the formula to take care of that.

I think a better way to do it would be to use actual dates and use the WEEKDAY function. For instance you could put the actual date in A2.

=IF(WEEKDAY(A2,1)=1, 10, 9)

2007-10-01 23:52:39 · answer #2 · answered by devilishblueyes 7 · 1 0

Try this
=if(a2="Sunday","10","9")

2007-10-01 13:49:56 · answer #3 · answered by stlouiscurt 6 · 0 1

even if version of Excel you're utilising, the make up of the function continues to be the same, i.e. =sumif(cellref,standards). only the two parameters as in assessment to a common if function you do no longer want a 0.33 parameter as you're no longer doing something with the cells that don't meet the factors.

2016-12-17 14:35:17 · answer #4 · answered by ? 4 · 0 0

fedest.com, questions and answers