View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default ? how to pull data from another sheet based on value

The macro recorder can help you learn. Here I selected the header row of the
data base and used datafilterautofilterfiltered for mondaycopied to the
other sheet. Of course, this can be greatly enhanced by removing all of the
selections. Assumes you had mon, tue, wed, etc typed in col b of the source
sheet.
this should get you started.

Sub Macro6()
'
' Macro6 Macro
' Macro recorded 12/16/2005 by Don Guillett
'

'
Range("A4:B4").Select
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="Mon"
Range("A8:B15").Select
Selection.Copy
Sheets("5 production worksheet").Select
Range("C8").Select
ActiveSheet.Paste
End Sub

--
Don Guillett
SalesAid Software

"ggodfroy" wrote in message
...
I want to put a value in a cell on SheetB for todays day (monday, tuesday,
etc.) and based on that value i want to pull data from the column on
SheetA
that has the valuse for that day and put it into a corresponding column in
SheetB.

So if i type in Monday on SheetB, I want to have the data in the Monday
column in SheetA be copied into SheetB. The data will be in multiple rows
in
the column.

not sure if that makes sense but any help would be greatly appreciated.