473,395 Members | 1,386 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Excel : Simply yet I can find it. AutoFilter

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
4 2939
Killer42
8,435 Expert 8TB
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
Use the following to select & copy the filtered data -


Selection.SpecialCells(xlCellTypeVisible).Select
Selection.Copy
May 10 '07 #3
Killer42
8,435 Expert 8TB
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
Killer42
8,435 Expert 8TB
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

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

Similar topics

1
by: CCC | last post by:
Our company have used Excel to filter out documents base on date, from_company, type_of_document, country to generate a list of where the documents physical location is. The number of records have...
2
by: JM | last post by:
Anyone know how to do an autofilter on a workbook in C#? Any snippets of code or reference material would be helpful!
0
by: Jon B | last post by:
Hi Everyone! I'm in need of help again! I'm just wondering if WinForm DataGrid can have Excel like AutoFilter? Here's an example: http://www.dotnetforce.com/Content.aspx?t=a&n=210 But again,...
9
by: John Brock | last post by:
I am trying to create a workbook where one of the worksheets contains an AutoFiltered table. It looks like it should be simple -- what I am doing is this: rng = ws.Range("MyTableRange")...
1
by: doug9149 | last post by:
Hello all, I've got some code I wrote using VBA for Excel that I'm trying to recreate using C#.NET. The code autofilters 1 entire column from 1 Worksheet from a Workbook and then appends this...
0
by: denvercr | last post by:
Hi Guys, I need to embed a dropdown list in my excel automation in C#, Do you have any idea how to use Excel.Range.AutoFilter method? or any suggested sites where I can learn this thing?.. Thank...
10
by: afromanam | last post by:
Regards, Please help What I'm trying to do is this: (and I can't use reports since I must export to Excel) I export some queries to different tabs in an excel workbook I then loop through...
1
by: ericjohnson | last post by:
I've got a macro that has already been written for an Excel spreadsheet used for estimating at work. I know enough VB to write very basic macros, but I cannot understand the logic and purpose behind...
1
by: bluejeanbaby | last post by:
Hi I'm trying to format an Excel file from within VB.NET 2008 (Framework 2.0). I'm not very familiar with Excel but have taken existing working code from an old VB6 program and am "tweaking" it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.