endlessboundless
New Member
- Joined
- Jan 27, 2011
- Messages
- 33
Hi, hope someone can help.
So the following macro I have, takes values on a list and inputs them 12 times each horizontally across the 'actual' and 'budget' tabs. What I need to change/add is...
1) I would like the macro to first clear those values on the 'actual'/'budget' tab in row C then input the values
2) I would like to input dates (Jan, Feb, Mar....) under each value in row C. Also i need this row (row D) cleared before the 'Jan, Feb....." is populated.
Dim rng As Range
Dim Ray As Variant
Dim Dn As Range
Set rng = Range(Range("C17"), Range("C" & Rows.Count).End(xlUp))
For Each Dn In rng
Ray = Ray & Application.Rept(Dn.Value & ",", 12)
Next Dn
Sheets("Actual").Range("C2").Resize(, rng.Count * 12) = Split(Ray, ",")
Sheets("Budget").Range("C2").Resize(, rng.Count * 12) = Split(Ray, ",")
Thank you in advance!!!
Amit
So the following macro I have, takes values on a list and inputs them 12 times each horizontally across the 'actual' and 'budget' tabs. What I need to change/add is...
1) I would like the macro to first clear those values on the 'actual'/'budget' tab in row C then input the values
2) I would like to input dates (Jan, Feb, Mar....) under each value in row C. Also i need this row (row D) cleared before the 'Jan, Feb....." is populated.
Dim rng As Range
Dim Ray As Variant
Dim Dn As Range
Set rng = Range(Range("C17"), Range("C" & Rows.Count).End(xlUp))
For Each Dn In rng
Ray = Ray & Application.Rept(Dn.Value & ",", 12)
Next Dn
Sheets("Actual").Range("C2").Resize(, rng.Count * 12) = Split(Ray, ",")
Sheets("Budget").Range("C2").Resize(, rng.Count * 12) = Split(Ray, ",")
Thank you in advance!!!
Amit