Create Multiple Filter and graph data

J

Jim Sablan

I tried to do a filter and then copy the filtered data from another sheet to create a chart. Can you please give me an advice or teach me on how to do that?

Any help would be greatly appreciated.

Thanks,

Jim
 
P

Per Jessen

Hi Jim

This macro will filter sheet1, and copy the filtered range to sheet2. The
filter I applied is non-empty cells in column B.

Sub CopyFilteredData()
Dim FilterRange As Range

Sheets("Sheet1").Activate
LastRow = Range("A3").End(xlDown).Row
Set FilterRange = Range("A2", Cells(LastRow, "C"))
FilterRange.Select
Selection.AutoFilter field:=2, Criteria1:="<>"
Selection.copy Destination:=Worksheets("Sheet2").Range("A2")
Selection.AutoFilter
End Sub

Hopes it helps

Regards,
Per

"Jim Sablan" skrev i meddelelsen news:[email protected]...
 

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