Filtering for any results within a range of columns in vba

Imabus

New Member
Joined
Mar 4, 2013
Messages
32
Hello,

I have a macro that will open my holiday sheet and filter it to anyone who is off today and display me the results (amongst other reports that i run each morning). Currently, it just shows me who is off on that day, i would like to see a list of everyone who is off within that week.

My spreadsheet is laid out as below with names on the in column C, there are columns for each date of the month and i identify the column for today by knowing that there are 14 columns before the dates starting and adding the current date to that, then using the sum of those for the filter column. So in the below example, i would expect to see the data filtered to show only Titles, rows 6,12 and 13.

My problems are:
How can i filter on five columns at the same time to show the results where there are any results in any of them?
How am i best to identify the range i am interested in?

Hopefully, the info below will be helpful, if anyone has a thought and needs more info then don't hesitate to ask.

Thank you!



NameMonTueWedThuFri
19th20th21st22nd23rd
1
2
3
4
5
6HF
7
8
9
10
11
12HF
13HF
14
15

<tbody>
</tbody>

<tbody>
</tbody>
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,216,176
Messages
6,129,316
Members
449,501
Latest member
Amriddin

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