Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 37

Thread: Filling formulas over to the right into a new column added

  1. #11
    Board Regular
    Join Date
    Aug 2019
    Posts
    145
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    I made a sample but I'm not sure how to send it to you or post it here.

  2. #12
    Board Regular
    Join Date
    Mar 2013
    Posts
    803
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    Have used the free limited file storage and sharing at box.com in the past.

  3. #13
    Board Regular
    Join Date
    Aug 2019
    Posts
    145
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    Sure but couldnít I just email it to you?

  4. #14
    Board Regular
    Join Date
    Mar 2013
    Posts
    803
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added


  5. #15
    Board Regular
    Join Date
    Aug 2019
    Posts
    145
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added


  6. #16
    Board Regular
    Join Date
    Mar 2013
    Posts
    803
    Post Thanks / Like
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    how about
    Code:
        Dim ws As Worksheet, oLo As ListObject
    
    Set ws = Sheets("Competitor Comparison")
    With ws
        Set oLo = .ListObjects("CompComparisonTable")
        With oLo
            .ListColumns.Add
            oLo.HeaderRowRange.Cells(1, .ListColumns.Count).Value = Range("C2")
            ws.Range(.ListColumns(.ListColumns.Count - 1).DataBodyRange, .ListColumns(.ListColumns.Count).DataBodyRange).FillRight
        End With
    End With

  7. #17
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,770
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    We see that you have Cross-Posted the question across multiple forums. While we do not prohibit that here, we do ask that you mention that you are doing so, and provide links to all the other places where you may have posted the question.

    A complete explanation of the rule can be seen here (rule 13): https://www.mrexcel.com/forum/board-...rum-rules.html

    Thank you.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  8. #18
    Board Regular
    Join Date
    Aug 2019
    Posts
    145
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    I tried it and still no luck. Everything worked up until the last line with the autofillright. I got a runtime error 424: Object required

    And to Joe4: I apologize I didnít know that rule but that is the only other place my question is posted

  9. #19
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,770
    Post Thanks / Like
    Mentioned
    57 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    And to Joe4: I apologize I didn’t know that rule but that is the only other place my question is posted
    OK. Just keep that in mind, and be sure to do that if you want to Cross-Post again in the future.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  10. #20
    Board Regular
    Join Date
    Aug 2019
    Posts
    145
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Filling formulas over to the right into a new column added

    I have still been at this and I had an idea. I used the Macro Recorder feature in Excel to create a base understanding of what the code should look like. Here is the recording:
    Code:
    Private Sub CommandButton1_Click()    
    Sheets("Competitor Comparison").Select
        Range("CompComparisonTable[Competitor_5]").Select
        Selection.AutoFill Destination:=Range( _
            "CompComparisonTable[[Competitor_5]:[Competitor_6]]"), Type:=xlFillDefault
        Range("CompComparisonTable[[Competitor_5]:[Competitor_6]]").Select
        End Sub
    I know this is probably incomplete because it was recorded but it definitely helped me. So the thing that needs to change in the code is:

    Instead of [Competitor_5], that should be the second to last DataBodyRange column.
    Instead of [Competitor_6), that should be the last DataBodyRange column.

    Did this make it easier to understand?
    Last edited by gaudrco; Sep 9th, 2019 at 02:35 PM.

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
  •