Pulling Data

S

Sarah

I have a large range of data that I would like to pull information from based
on several factors. There may be more then one outcome. Is there anyway to
pull that information and put it in a table on a different worksheet?
 
D

Don Guillett

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.
 
D

Don Guillett

Sub getdataSAS()
Dim lr As Long
Dim fc As Long
Dim ds As Worksheet
Application.ScreenUpdating = False
Columns(3).Resize(, 5).Delete
With Sheets("Data")
fc = Sheet2.Range("b4") * 2 + 3'merged
Set ds = Sheets("sheet1")

lr = .Cells(Rows.Count, 2).End(xlUp).Row

.Range("B4:Z400").AutoFilter Field:=2, Criteria1:="<=" & ds.Range("b3")

.Columns("b:d").Copy ds.Range("c1")
.Columns(fc).Resize(, 2).Copy ds.Range("f1")

.Range("B4:Z4").AutoFilter
End With
Range("b4").Select
Application.ScreenUpdating = True
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top