Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple conditional find, copy and paste


Hi,

I have:

Workbook called "wb1".
= It contains sheets "Asheet" and "Bsheet".
= "Asheet" contains 900 rows of data.
= "Asheet" contains the columns "1col", "2col", "3col", "4col"
"5col", etc ...

I would like to:

* Have a button in "Bsheet" called "Get Data from Asheet".
* First the user enters some search criteria text in cell c5 i
"Bsheet".
* Then he clicks on the "Get Data from Asheet" button.
* The VBA code attached to the "Get Data from Asheet" button woul
then find all the rows in "Asheet" where "3col" contains the text tha
is specified in cell c5 in "Bsheet".
* All the rows in "Asheet" that contain this text in "3col" should b
copied to "Bsheet" beginning at cell d9.
* Note: in the case of column "3col" the text should just contain th
criteria text. There is no need for an exact match or cas
sensitivity.

Can you please give me the VBA code for this "Get Data from Asheet
button?

Thanks,
Luthe

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default simple conditional find, copy and paste


Hi,

I still need help with this VBA script.
Can you please help?

Thanks,
Luther


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 473
Default simple conditional find, copy and paste

Lothario wrote:
I still need help with this VBA script.
Can you please help?

Something like this - but you may need to adjust the bit about the
criteria - not sure if I have understood your requirement


With ASheet.Range("A1").CurrentRegion
.AutoFilter
.AutoFilter 3, BSheet.Range("C5").Value
.Offset(1).SpecialCells(xlVisible).Copy
BSheet.Range("D9").PasteSpecial xlValues
Application.CutCopyMode = False
.AutoFilter
End With

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Macro - I think... Copy - Paste on Click Scott Campbell[_2_] Excel Discussion (Misc queries) 5 November 14th 12 12:52 AM
Line copy - Not just a simple copy paste Ninerref Excel Worksheet Functions 3 September 10th 09 11:44 AM
Help! What's wrong with this simple copy and paste Richard James[_3_] Excel Programming 4 November 23rd 03 12:57 AM
Simple copy and paste Fritz[_2_] Excel Programming 2 November 22nd 03 01:56 PM


All times are GMT +1. The time now is 09:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"