Posts by anick

    Re: Macro To Copy + Paste Values To Next Column w/o Values


    I resolved the issue, pretty simple fix. Here's the code that worked:


    Sub NextBlankCol() ActiveSheet.Range("E2:E52").Copy
    Sheets("Sheet1").Range("IV2").End(xlToLeft).Offset(, 1).PasteSpecial xlValues
    Application.CutCopyMode = False
    End Sub

    Here's a simplified version of the Excel worksheet on which I'm planning to run the macro. I want the macro to copy values from column E (Calc) and paste the values to the next blank column. For example, I would run the macro at the end of June and it would paste values from column E to column F. I'd run it again in July and it would copy and paste values from column E to column G.


    [ATTACH=CONFIG]69517[/ATTACH]
    I tried using the code below, but since the columns technically aren't blank (the month names populate the first row of each column - can't change this), the macro doesn't work as I want it to. I've included a picture below of what the worksheet looks like after I run my current macro.


    Sub NextBlankCol() ActiveSheet.Range("E2:E52").Copy
    Sheets("Sheet1").Range("IV1").End(xlToLeft).Offset(, 1).PasteSpecial xlValues
    Application.CutCopyMode = False
    End Sub



    [ATTACH=CONFIG]69518[/ATTACH]
    Would appreciate any help, thanks!