VBA Express Forum  




Go Back   VBA Express Forum > VBA Code & Other Help > MS Project
     Feedback     
Register FAQ Members Arcade Knowledge Base Training Articles Consulting

Reply
 
Thread Tools Display Modes
Old 11-22-2011, 05:19 PM   #1
hashforth

 
Joined: Nov 2011
Posts: 1
Kb Entries: 0
Articles: 0
Copy and paste in VBA

Hi,

I am new to VBA and some help with a macro would be great! Attached is data that models my problem. Ideally, I would like the macro to recognize the value in the drop down menu in sheet2 cell B2 and pull in the corresponding data associated with that value from sheet1. Ideally, the macro would copy and paste the data in sheet1 to sheet2 to match the column headings for that particular value in sheet2 cell B2. So for example:

Sheet 1: Data set
HTML Code:
A B C Filing Date Company Name Revenue 1/1/2000 ABC, Inc. 1234 4/14/2008 FGH, Inc. 5678 4/6/2005 DEF, Inc. 5664 7/7/1999 ABC, Inc. 1356 5/8/2010 XYZ, Inc. 6456 5/8/2010 ABC, Inc. 3213 1/23/2005 FGH, Inc. 8546 4/5/2006 FGH, Inc. 2133 12/25/2010 ABC, Inc. 5466 11/13/2010 ABC, Inc. 5465

Sheet 2: "ABC, Inc." is selected in the drop down menu in cell B2:

HTML Code:
B Drop Down ABC, Inc.

After the macro fires, the result on sheet2 is:
HTML Code:
E F G Filing Date Company Name Revenue 1/1/2000 ABC, Inc. 1234 7/7/1999 ABC, Inc. 1356 5/8/2010 ABC, Inc. 3213 12/25/2010 ABC, Inc. 5466 11/13/2010 ABC, Inc. 5465

If I need to be more specific or provide any additional information please let me know. I am indeed new to VBA.

Thanks!
Attached Files To view attachments your post count must be 0 or greater. Your post count is 0 momentarily.

Local Time: 12:01 PM
Local Date: 05-23-2013
Location:

 
Reply With Quote Top
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -7. The time now is 01:01 PM.


Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright © 2004 - 2012 VBA Express