Copying data based on a separate column

Atvolpini

New Member
Joined
Oct 26, 2017
Messages
15
Hi All,

I am coming to you with a question regarding filling in large amounts of data. I have a script which generates a column of data based on a couple fields my end users fill in. The next step I would like to automate is filling in other fields of each row for each value generated by the first script. The very first row is filled in by the end users based on controlled vocabulary/data validation. I need to copy the values down each column until i reach the last value of the 1st column. Here is what I mean graphically:

Here is what the table looks like after the first script:
ID CodeLetterNumber
A1a1
A2
A3
A4
A5
A6
A7
A8
A9
A10
A11
A12

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
And here is what I need to happen:

ID CodeLetterNumber
A1a1
A2a1
A3a1
A4a1
A5a1
A6a1
A7a1
A8a1
A9a1
A10a1
A11a1
A12a1

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>

In reality, there are many more columns than just "letter" and "number" but im hoping to just adjust the code. I tried to figure out how to do this on my own, but my VBA skills are still pretty weak.

Thanks in advance!
 

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.
How about
Code:
Sub MyFillDown()
   Range("A2", Range("A" & Rows.Count).End(xlUp)).Offset(, 1).Resize(, 2).Filldown
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,110
Messages
6,123,143
Members
449,098
Latest member
Doanvanhieu

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