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:

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
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")))
 
Upvote 0
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
:)
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,547
Messages
6,120,139
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top