Computing.Net > Forums > Office Software > Writing a Macro with VBA

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Writing a Macro with VBA

Reply to Message Icon

Name: keepcback
Date: January 7, 2009 at 12:43:10 Pacific
OS: Windows Vista
CPU/Ram: Centrino/3 GB Ram
Product: Hewlett-packard / Pavilion dv2000
Subcategory: Microsoft Office
Comment:

I need to write a macro that will Match data in ColumnC Sheet1 with ColumnA Sheet2, follow same row over in Sheet2 to ColmnG and copy that data to ColumnO Sheet1 corresponding with ColumnC Sheet1, using loop for 11280 cells. Any help would be much appreciated!!



Sponsored Link
Ads by Google

Response Number 1
Name: jon_k
Date: January 8, 2009 at 05:40:02 Pacific
Reply:

why use a macro? If I understand your request correctly, you can use

=INDIRECT("Sheet2!G"&match(C2,sheet2!A:A,0))

Entered in sheet1 cell O2: can then be copied down.

Note Indirect() is what's known as a volatile function (it recalculates every time you do anything on the sheet), so it might be worth using copy/paste special/values afterwards for speed reasons.


0

Response Number 2
Name: keepcback
Date: January 8, 2009 at 08:21:21 Pacific
Reply:

Thanks for the information. I did that exactly. Copied down ColumnG of sheet 1 and I only recieved the last 3 cells with information. I did go and see if anything else matched and they do. What might cause this to happen?

Thanks

Donna


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Writing a Macro with VBA

write a simple macro for summing www.computing.net/answers/office/write-a-simple-macro-for-summing/6832.html

Need help writing Excel Macro www.computing.net/answers/office/need-help-writing-excel-macro/6792.html

Access 2002 Reports www.computing.net/answers/office/access-2002-reports/2434.html