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!
 

Some videos you may like

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

sykes

Well-known Member
Joined
May 1, 2002
Messages
1,759
Office Version
  1. 365
Platform
  1. Windows
Sirius! You're alive after all!!

When can we meet again?

Harry
 

sykes

Well-known Member
Joined
May 1, 2002
Messages
1,759
Office Version
  1. 365
Platform
  1. Windows
Oh yes, and Welcome to Mr Excel!
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,397
Office Version
  1. 365
Platform
  1. Windows
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.
 

Watch MrExcel Video

Forum statistics

Threads
1,118,330
Messages
5,571,570
Members
412,406
Latest member
DutchMonkey
Top