Consulting

Results 1 to 3 of 3

Thread: Solved: Problem in append data to next column

  1. #1
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location

    Solved: Problem in append data to next column

    Hi there,
    I have 3 worksheet and I wanted to transfer my current data in sheet("Cards") column D Add to column E of the same sheet and at the same time append to next column A in sheet ("FY0809").

    The button in sheet("reportdate") will run the macro for above task. However the data only appended in column B of sheet ("FY0809") instead of next column on every button pressed.

    The macro works in VBE under run but failed in button click command. Anybody can assist me ?

    Attach the sample workbook

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    The relevant part only
    [VBA]
    Sub AddtoCul()
    Dim NextCol As Range
    Set NextCol = Worksheets("FY0809").Cells(1, 256).End(xlToLeft).Offset(, 1)
    Worksheets("cards").Range("D559").Copy
    NextCol.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False '
    End Sub

    [/VBA]
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  3. #3
    VBAX Contributor
    Joined
    Sep 2007
    Posts
    119
    Location
    It works perfectly. Thanks Md for your quick solution.

Posting Permissions

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