Thanks Thanks:  0
Results 1 to 8 of 8

Thread: this ones to complex for me

  1. #1
    New Member
    Join Date
    Nov 2018
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default 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. #2
    Board Regular sandy666's Avatar
    Join Date
    Oct 2015
    Posts
    540
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Default Re: this ones to complex for me

    is column C really needed?
    Show your Excel version, use Table Tool to show example of: source data and expected result. Link to one example excel file is worth of 1000 words. Pictures are not nearly as helpful as Tables
    impossible things we do on the spot. for miracles you need to wait for a while

  3. #3
    New Member
    Join Date
    Nov 2018
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: this ones to complex for me

    it sure is

  4. #4
    New Member
    Join Date
    Nov 2018
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default 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. #5
    Board Regular sandy666's Avatar
    Join Date
    Oct 2015
    Posts
    540
    Post Thanks / Like
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)

    Default 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
    Last edited by sandy666; Nov 8th, 2018 at 09:59 PM.
    Show your Excel version, use Table Tool to show example of: source data and expected result. Link to one example excel file is worth of 1000 words. Pictures are not nearly as helpful as Tables
    impossible things we do on the spot. for miracles you need to wait for a while

  6. #6
    MrExcel MVP
    Join Date
    Aug 2010
    Location
    Rio de Janeiro BRAZIL
    Posts
    15,105
    Post Thanks / Like
    Mentioned
    11 Post(s)
    Tagged
    6 Thread(s)

    Default 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.
    Last edited by Marcelo Branco; Nov 8th, 2018 at 10:19 PM.

  7. #7
    New Member
    Join Date
    Nov 2018
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: this ones to complex for me

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

  8. #8
    New Member
    Join Date
    Nov 2018
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default 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.

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

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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