this ones to complex for me

JerVD

New Member
Joined
Nov 8, 2018
Messages
8
Sheet 1 holds all the information. Sheet 2 is going to be a kind of chart that I want to be auto created.

on Sheet 1,
Column A is the names, Column B is the Column # on sheet 2,
Column C is the starting row # on sheet 2, Column D is the amount of times I want the name to be repeated.

Sheet 1
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Ron[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Bruce[/TD]
[TD]1[/TD]
[TD]7[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Fred[/TD]
[TD]2[/TD]
[TD]4[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD]James[/TD]
[TD]3[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
</tbody>[/TABLE]

Sheet 2
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Ron[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]Ron[/TD]
[TD][/TD]
[TD]James[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]Ron[/TD]
[TD][/TD]
[TD]James[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Ron[/TD]
[TD]Fred[/TD]
[TD]James[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Ron[/TD]
[TD]Fred[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD]Fred[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]Bruce[/TD]
[TD]Fred[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]Bruce[/TD]
[TD]Fred[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD][/TD]
[TD]Fred[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

this one is a tough one. I've tried a couple things but with no luck.
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
I could get rid of column C and make Column B a Decimal 1.1, 1.2, 1.3, 2.1, 2.2
but it is important that I can control the column and the starting row.
 
Upvote 0
sure,
it's just about starting row
without column C it is simple but with...
3am here so my brain is too slow :)

-- maybe someone else
 
Last edited:
Upvote 0
Maybe this macro...

Code:
Sub aTest()
    Dim vData As Variant, i As Long
    
    With Sheets("Sheet1")
        vData = .Range("A1:D" & .Cells(.Rows.Count, "A").End(xlUp).Row)
    End With
    
    For i = LBound(vData, 1) To UBound(vData, 1)
        Sheets("Sheet2").Columns(vData(i, 2)).Cells(vData(i, 3)).Resize(vData(i, 4)) = vData(i, 1)
    Next i
End Sub

M.
 
Last edited:
Upvote 0
Sorry im not familiar with macros. ill have to do some research on the subject to know what this does.

Maybe this macro...

Code:
Sub aTest()
    Dim vData As Variant, i As Long
    
    With Sheets("Sheet1")
        vData = .Range("A1:D" & .Cells(.Rows.Count, "A").End(xlUp).Row)
    End With
    
    For i = LBound(vData, 1) To UBound(vData, 1)
        Sheets("Sheet2").Columns(vData(i, 2)).Cells(vData(i, 3)).Resize(vData(i, 4)) = vData(i, 1)
    Next i
End Sub

M.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

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