Filtering tables by cell value.

thegooser123

New Member
Joined
Nov 10, 2010
Messages
25
Hi all,

I have a workbook with 4 different sheets on it. On 3 of the sheets are tables which I have to filter. The formats of the 3 tables are all pretty much the same.

I need to filter these tables using the little arrows on the headers to firstly filter by a specific date, and then by a text field (a name). I have to repeat this over the 3 tables.

then on the remaining sheet I have to manually write in the name and the date in two different cells.

Is there anyway that I can just write the date and name in and excel would automatically filter the other three tables depending on what I wrote?

Any ideas?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
Take a look at this code, it will filter a sheet based on the values from another then copy the values you can take that bit out. Add extra lines based on the sheet names.

Sub Macro2()
'
' This will filter the values
' Run this on Sheet1 making sure you have something in G10
' Extend the filter as necessary
Sheets("Sheet2").Select

Selection.AutoFilter
ActiveSheet.Range("$E$3:$F$21").AutoFilter Field:=1, Criteria1:=Sheets("Sheet1").Range("G10")
Range("E3").Select
ActiveCell.CurrentRegion.Copy
Sheets("Sheet1").Select
Range("E3").Select
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.PasteSpecial xlPasteAll

End Sub
 
Upvote 0
Take a look at this code, it will filter a sheet based on the values from another then copy the values you can take that bit out. Add extra lines based on the sheet names.

I don't think that this is going to work for me. I forgot to mention that none of the 3 different tables have a set amount of rows. They could be anything from 0 to 300 rows, so the Range("$E$3:$F$21") wouldn't apply here.
 
Upvote 0
Just extend the range to something outside what would be there so like

Range("$E$3:$F$2500")
 
Upvote 0
Ahhh....


well I'm almost there, the numbers are adding up but not displaying on the filtered table. by that I mean if I change the value of the name, it is returning the result that I'm looking for, but its not changing the table (I need this for printing).

Is there anyway I can send you the workbook for you to have a look at?
 
Upvote 0
Send me a copy of your workbook to look at, please ensure I have the information to look at, ie you tell me which sheet names etc.

Email address is: (Please make sure you zip the workbook before sending)

trevorglover@wuit.co.uk
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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