Formula for filtering data with Names , Month and Weeks

maabadi

Well-known Member
Joined
Oct 22, 2012
Messages
2,681
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hi
I have information in one sheet. I want to filter them with formula 3 times.
1. with Card No.
2. With Month
3. With Week
and the last, I have personal report for one month or Week
Row No.Card No.Card&Row No.First NameLast NameDateWeek DayInput TimeOutput TimePresence TimeCharged SentryTotal days Report
1100100001MohammadAhmadi3/20/2014Thursday10:58:0022:15:0011:17:00Sunday Shift 41
2100100002MohammadAhmadi3/23/2014Sunday10:25:0015:00:0004:35:00Sunday Shift 41
3100100003MohammadAhmadi3/28/2014Friday10:00:0016:00:0006:00:00Sunday Shift 41
4100100004MohammadAhmadi3/31/2014Monday13:00:0017:00:0004:00:00Sunday Shift 41
5100100005MohammadAhmadi4/1/2014Tuesday12:00:0015:00:0003:00:00Sunday Shift 41
6100100006MohammadAhmadi4/3/2014Thursday09:40:0021:00:0011:20:00Sunday Shift 41
1102102001QasemSaadatvand3/29/2014Saturday11:20:0015:00:0003:40:00Saturday Shift 31
2102102002QasemSaadatvand3/30/2014Sunday11:00:0015:30:0004:30:00Saturday Shift 31
3102102003QasemSaadatvand3/31/2014Monday11:00:0015:00:0004:00:00Saturday Shift 31
4102102004QasemSaadatvand4/1/2014Tuesday11:00:0014:30:0003:30:00Saturday Shift 31
5102102005QasemSaadatvand4/2/2014Wednesday11:00:0015:20:0004:20:00Saturday Shift 31
1103103001YunesAbbasi3/23/2014Sunday11:45:0015:00:0003:15:00Tuesday Shift 21
2103103002YunesAbbasi3/25/2014Tuesday11:15:0015:20:0004:05:00Tuesday Shift 21
1105105001YusefPourizad4/3/2014Thursday11:00:0014:00:0003:00:00Tuesday Shift 2

<tbody>
</tbody>

I Know, I can do this with filter Option. Is it possible with Formulas?

Thanks,
Maabadi
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
quick and dirty with advance filter

NOPQRSTUVWXY
1INPUT CRITERIAINPUT CRITERIAINPUT CRITERIA
2DateCard No.Week Day
3=IF(N1="",">1",">" &N1)=IF(O1="","*",O1)=IF(P1="","*",P1)

<tbody>
</tbody>

Go to VB and insert these codes to a module.
Code:
Sub FilterData()

    ActiveWindow.SmallScroll Down:=-21
    Sheet1.Range("A2").CurrentRegion.AdvancedFilter Action:=xlFilterCopy, _
        CriteriaRange:=Range("N2:P3"), CopyToRange:=Range("N6:Y6"), Unique:=False
End Sub


Sub ClearData()

Dim ws As Worksheet
Set ws = Sheet1
ws.Range("N1:P1").ClearContents
With ws.Range("N7:Y10000")
.Borders.LineStyle = xlNone
.ClearContents
End With

End Sub

& insert two buttons or shapes in your sheet then assign macro to each one.
 
Last edited:
Upvote 0
Solution

Forum statistics

Threads
1,216,104
Messages
6,128,856
Members
449,472
Latest member
ebc9

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