Results 1 to 13 of 13

Loop command macro to copy data between worksheets

Threaded View

  1. #1
    Registered User
    Join Date
    06-19-2009
    Location
    Auburn, Indiana
    MS-Off Ver
    Excel 2003/Excel 2007
    Posts
    10

    Loop command macro to copy data between worksheets

    I am having trouble creating a macro for an excel file I am working on. I do not have much experience writing macros, so I apologize for any confusion. I have created a simplified version of the file I am attempting to write a macro for and attached it to my post here.

    At this point it would be helpful for you to open up the attached file so that you can understand my explanation.

    Basically what I want the macro to do is:
    1. Match up "Product" on Wksht(Input) with "Product" on Wksht(Data).
    2. Copy the "Usage per ton" and "Dollars per ton" values corresponding to the given product from Wksht(Input) to Wksht(Data) for the correct month. (The user will manually enter the month, ie "August 09" into Wksht(Input) each month when he runs the macro.)
    ++The color fills will not exist on my finished macro. I only put them there to illustrate the values that will be copied and pasted.

    I want the macro to be written with Loop commands so that it will check to be sure the product number matches with the given location for pasting the data values. I should also note I use PasteSpecial_Values because of the formulas in the cells on Wksht(Input).

    I would appreciate any suggestions for this situation. Please let me know if you have any questions about my above explanation, I would be glad to offer more details.
    Attached Files Attached Files
    Last edited by ThunderBuck; 08-12-2009 at 10:59 AM. Reason: Improper Title

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1