VBA Challenged

Sirius Black

New Member
Joined
Dec 9, 2005
Messages
32
This is an awesome site! First time posting. While I am more than sufficient at using Excel Worksheet functions, VBA is somewhat of a challenge for me. I have a project that I am working on, which requires some VBA code to be written.

I have two sheets, Data & COR. What I want to do is copy data from the Data sheet & paste it into COR. Sounds pretty easy so far. Well, here is one of my problems. The data in the Data sheet will always go from column A to column N. Howerver, the # of rows will vary depending on user selections.

What I'm looking to do, is copy columns A & B from Data (starting with row 4) and paste into columns A & B in COR (the paste should begin in row 9). Column C in COR is a calculated field, calculating the rank of each item. I will need to copy data if column C & D in Data and paste into column D & E in COR. Columns F & G in COR are calculated fields. The formula for cell F10 will point back to cell D10. The formula for F11 will be F10+D11. The formula for F12 will be F11+D12, and so on. The formula for G10 in COR will be D10/$D$9. The formula for G11 in COR will be (D11/$D$9)+G10. The formula for G12 will be (D12/$D$9)+G11, and so on. I will also need to copy from Data, column E and paste into COR column H. Column I in COR will be filled with info from another set of macros that I will need to write. Column J in COR is another calculated field, with the following formula (100-H)*(D-H). Column K, which is the final column in COR, is another calculated field, with the following formula (J*$J$4).

Sorry for such a long description. Thought the more detail the easier it would be to figure out the answer.

Thanks for any and all help!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Sirius! You're alive after all!!

When can we meet again?

Harry
 
Upvote 0
Oh yes, and Welcome to Mr Excel!
 
Upvote 0
Looks like you got a lot going on there.

If you are kind of new with macros/VBA, a good start is to use the macro recorder (Tools | Macro | Record New Macro) to record all your actions as you manually do what you want. Then turn off the macro recorder and view your code. We can help you clean it up to make it more dynamic.

Give it a shot and see how you do and post the sections of code you need help cleaning up.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,851
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top