Joining two IF/ AND statements

Anthea

New Member
Joined
Apr 5, 2011
Messages
13
I am trying to join two statements but keep getting errors. Please could someone help me and explain how to join them into one statement? Both Statements work correctly on their own

=IF(AND(A12>=$K$3,A12<=$L$3),"Sunday",(TEXT(A12,"dddd")))
=IF(AND(A12>=$K$4,A12<=$L$4),"Sunday",(TEXT(A12,"dddd")))

ROW/ COLUMNColumn AColumn KColumn L
1LEAVE
2STARTEND
32018/03/052018/03/24
42018/12/162019/01/02
5
6
7
8
9
10
11
12Thu 2018/03/01ThursdayThursday
13Fri 2018/03/02FridayFriday
14Sat 2018/03/03SaturdaySaturday
15Sun 2018/03/04SundaySunday
16Mon 2018/03/05SundayMonday
17Tue 2018/03/06SundayTuesday
18Wed 2018/03/07SundayWednesday
19Thu 2018/03/08SundayThursday
20Fri 2018/03/09SundayFriday
21Sat 2018/03/10SundaySaturday

<tbody>
</tbody>
 
Last edited:

Some videos you may like

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.

steve the fish

Well-known Member
Joined
Oct 20, 2009
Messages
8,055
Office Version
365
Platform
Windows
OR would be this for example:

=IF(OR(AND(A12>=$K$3,A12<=$L$3),AND(A12>=$K$4,A12<=$L$4)),"Sunday",(TEXT(A12,"dddd")))
 

Anthea

New Member
Joined
Apr 5, 2011
Messages
13
Thank you so much ... that is exactly what I was looking for. I tried the 'or' instead of the 'and' but never thought to put them together
:)
 

Anthea

New Member
Joined
Apr 5, 2011
Messages
13
To include all the cells K3 to L11 would I just expand the references for Column K from K3 to K11 and the same for Column L or is there a more elegant way of referencing those cells?
 

Watch MrExcel Video

Forum statistics

Threads
1,095,423
Messages
5,444,367
Members
405,278
Latest member
karen1

This Week's Hot Topics

Top