Auto recognize weekends with month as row/day as column?

lichldo

Board Regular
Joined
Apr 19, 2022
Messages
65
Office Version
  1. 365
Platform
  1. MacOS
Hello, I have a worksheet set up like this for us to paste in data we get from a daily report, and at the end we will have some percentage calculation, however there will be some columns with no data since they are weekends. Is there a way for excel to recognize those in this format and put a "-" or a "0" or a different color or something in those cells? We will want the formulas we put in column AH (after the 31st day) to exclude any cells that are weekends

Screen Shot 2022-06-27 at 12.11.03 PM.png
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
does the format - just show TEXT - as it could refer to any year
you may want to put a year somewhere so it can be used

if you are putting data into the cells, then you will overwrite any formula setup
so you will probably need VBA - not my area

If you want a colour
then
=WEEKDAY(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B$1,"st",""),"nd",""),"rd",""),"th","")*1&"/"&MONTH(DATEVALUE($A2&"1"))&"/"&2022,2)>5

would be simplier if the month was actually a real date - formatted just to show the month - then no year needed
also if the day of month was just 1 , 2, 3 and not using the ordinals (st, nd, rd etc)

i have just done a little example as it takes time to setup

Book4
ABCDEFGHIJKLMNOP
11st2nd3rd4th5th6th7th8th9th10th11th12th13th14th15th
2january
3february
4march
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:P4Expression=WEEKDAY(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B$1,"st",""),"nd",""),"rd",""),"th","")*1&"/"&MONTH(DATEVALUE($A2&"1"))&"/"&2022,2)>5textNO


Note: Images are difficult to see , and also requires that I input all the data myself, which is very time consuming.

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC , then put the sample spreadsheet onto a share
I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed
 
Upvote 0

Forum statistics

Threads
1,214,785
Messages
6,121,543
Members
449,038
Latest member
Guest1337

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