By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,982 Members | 1,738 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,982 IT Pros & Developers. It's quick & easy.

Excel : Simply yet I can find it. AutoFilter

P: 3
Hello,

I would like to paste data at a cell found by the Selection.Autofilter function.
My two first columns hold a "scenario" and "replication" data.
I would like upon running a macro to paste certain data into the third column at the same row where the replication and scenario are located.

Scen = Application.InputBox("Choose Scenario")
Rep = Application.InputBox("Choose Replication")
Range("A2:B650000").Select
Selection.AutoFilter Field:=1, Criteria1:=Scen, Operator:=xlAnd
Selection.AutoFilter Field:=2, Criteria1:=Rep, Operator:=xlAnd

This code filter the data and return only one row.
How can I select this row ? I want to paste data at the third cell of that row.

Thanks,
Tripy.
Apr 16 '07 #1
Share this Question
Share on Google+
4 Replies


Expert 5K+
P: 8,434
I'm not expert in this area, but I don't think AutoFilter selects anything. I think it only changes the way you are viewing the data.

You probably need to use one of the search/selection functions, instead of (or in addition to) the AutoFilter.
Apr 17 '07 #2

P: 1
Use the following to select & copy the filtered data -


Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
May 10 '07 #3

Expert 5K+
P: 8,434
Use the following to select & copy the filtered data -


Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Thanks for that. This one will probably end up in the tips and tricks.
May 10 '07 #4

Expert 5K+
P: 8,434
I have placed an entry in the Articles forum. Here is a link so you can see whether you're happy with the result.
May 11 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.