# Return results based on days of the week

#### jeffdlinn

##### New Member
I have the following data in Column A. I'm trying to write a formula that looks at column A and will place the value of 1 in column b if the day of the week is not Tuesday or Wednesday.

so
Saturday, January 1, 2022 = 1
Sunday, January 2, 2022 = 1
Monday, January 3, 2022 = 1
Tuesday, January 4, 2022 = 0
Wednesday, January 5, 2022 = 0

 Saturday, January 1, 2022 Sunday, January 2, 2022 Monday, January 3, 2022 Tuesday, January 4, 2022 Wednesday, January 5, 2022 Thursday, January 6, 2022 Friday, January 7, 2022 Saturday, January 8, 2022 Sunday, January 9, 2022 Monday, January 10, 2022 Tuesday, January 11, 2022 Wednesday, January 12, 2022 Thursday, January 13, 2022

### Excel Facts

Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

#### alansidman

##### Well-known Member
=IF(AND(WEEKDAY(A1)<>3,WEEKDAY(A1)<>4),1,0) and copy down

Book11
AB
1Saturday, January 1, 20221
2Sunday, January 2, 20221
3Monday, January 3, 20221
4Tuesday, January 4, 20220
5Wednesday, January 5, 20220
6Thursday, January 6, 20221
7Friday, January 7, 20221
8Saturday, January 8, 20221
9Sunday, January 9, 20221
10Monday, January 10, 20221
11Tuesday, January 11, 20220
12Wednesday, January 12, 20220
13Thursday, January 13, 20221
Sheet2
Cell Formulas
RangeFormula
B1:B13B1=IF(AND(WEEKDAY(A1)<>3,WEEKDAY(A1)<>4),1,0)

#### jeffdlinn

##### New Member
Thanks - Worked great

#### Fluff

##### MrExcel MVP, Moderator
Bit late, but another option
Excel Formula:
``=--(A1=WORKDAY.INTL(A1-1,1,"0110000"))``

Replies
6
Views
209
Replies
2
Views
225
Replies
8
Views
199
Replies
2
Views
90
Replies
12
Views
1K

1,148,022
Messages
5,744,368
Members
423,865
Latest member
SimSum

### 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.

### Which adblocker are you using?

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

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