Thanks:  0

# Thread: this ones to complex for me

1. ## this ones to complex for me

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
 Ron 1 1 5 Bruce 1 7 2 Fred 2 4 6 James 3 2 3

Sheet 2
 1 2 3 1 Ron 2 Ron James 3 Ron James 4 Ron Fred James 5 Ron Fred 6 Fred 7 Bruce Fred 8 Bruce Fred 9 Fred 10 11

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

2. ## Re: this ones to complex for me

is column C really needed?

it sure is

4. ## Re: this ones to complex for me

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.

5. ## Re: this ones to complex for me

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

6. ## Re: this ones to complex for me

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.

7. ## Re: this ones to complex for me

what if we get rid of column D. don't make the name repeat??

8. ## Re: this ones to complex for me

Sorry im not familiar with macros. ill have to do some research on the subject to know what this does.

Originally Posted by Marcelo Branco
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.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•