Do not perform on weekend

DHAM1963

New Member
Joined
Jan 25, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
=OR(WEEKDAY(A3)=1,WEEKDAY(A3)=7)
=IF(ISNA(VLOOKUP(B$1,Drivers!$A$2:$A$26,1,0)),"NA","")

So what I am trying to do is put these together, I only want to perform the second line if A3(column A is a date field) is not a weekend but I am struggling to get it to work properly. Any help would be appreciated. TIA
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Welcome to the Board!
You can imbed them in an IF formula, i.e.
=IF(OR(WEEKDAY(A3)=1,WEEKDAY(A3)=7),IF(ISNA(VLOOKUP(B$1,Drivers!$A$2:$A$26,1,0)),"NA",""),"")
 
Upvote 0
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(WEEKDAY(A3,2)>5,"",IF(ISNA(VLOOKUP(B$1,Drivers!$A$2:$A$26,1,0)),"NA",""))
 
Upvote 0
Solution
Hi & welcome to MrExcel.
How about
Excel Formula:
=IF(WEEKDAY(A3,2)>5,"",IF(ISNA(VLOOKUP(B$1,Drivers!$A$2:$A$26,1,0)),"NA",""))
Thank you so much, this solution worked well for me. The other thing I had to do to make it all work was to delete all the conditional formatting I had on the sheet, go and apply the formula and then add the conditional formatting back after the formula was in effect, it seemed to understand at that point that the formula goes first and then the conditional formatting.
 
Upvote 0
Welcome to the Board!
You can imbed them in an IF formula, i.e.
=IF(OR(WEEKDAY(A3)=1,WEEKDAY(A3)=7),IF(ISNA(VLOOKUP(B$1,Drivers!$A$2:$A$26,1,0)),"NA",""),"")
Thanks for your suggestion!
 
Upvote 0
Thank you so much, this solution worked well for me. The other thing I had to do to make it all work was to delete all the conditional formatting I had on the sheet, go and apply the formula and then add the conditional formatting back after the formula was in effect, it seemed to understand at that point that the formula goes first and then the conditional formatting.
Hmm... That does not sound quite right to me. It does not matter what order formulas on the cell were entered versus when the Conditional Formatting was created.
More likely, there was an issue with the Conditional Formatting rule you had, and it needed to be corrected.
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,425
Members
448,961
Latest member
nzskater

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