Skip to content

Excel VBA Help (I didn’t know where else to put it?)

Tim ColtonMember for 17 years 6 months
Created
1
6
0
Hello

i was wondering if anyone here has any experiance with writing macros. I have just inherited a project and a lot of the information is in excel spread sheets. This I don’t mind it is just that the previous project manager was a wiz at macros. This means that I now have to learn so. I just need to know how to programme a simple copy and paste loop.

The problem:

I have a table. I need to copy from it the rows of the table and some cells of the cells above the table. The cells above the table need to be repeated for every row. The whole loop needs to be repeated until there is an empty cell at he bottom of the table.

Cheers for your help.

1 reply

Oldest first
  1. 0
    Rodel Marasigan ·
    Tim,
    You can use record macro in Excel (Tools-> Macro-> Record New Macro)
    Then record the task you’re doing and it will automatically write a macro for you. Record the complete task that you want to do. (Single pass task before it goes to same task or loop)
    Ex: Highlight row then copy and go to another cell and then paste.

    After recording the macro click Stop Macro. Then go to Tools-> Macro-> Visual Basic Editor. Find folder Module on the left (Project Object) and double click Module 1 or any module created. On the right side window panel it show the recorded code. Copy and paste the code in this post so I can understand what do you want to do and I will modify the code to create the loop that you can execute to do the task automatically.

    Best Regards,
    Rodel

Log in or join to reply

ProjectControls.com is free to join. Members can post questions, reply, vote and follow discussions.

Existing members: your original username and password still work. Forgot password?