+ Reply to Thread
Results 1 to 2 of 2

Thread: With's and end withs sheets and copying.

  1. #1
    Registered User
    Join Date
    04-17-2011
    Location
    Orlando
    MS-Off Ver
    Excel 2007
    Posts
    27

    Exclamation With's and end withs sheets and copying.

    Okay so I have this code that copies the contents of one cell (A1) and pastes it into anouther (B1). the next time the code is ran, (A1) will be pasted into (B2)
    See Code below:

        With Sheet1
        .Cells(.Rows.Count, 2).End(xlUp).Offset(1, 0).Value = .Range("A1").Value
        End With

    I have had to change a few things around due to expanding.

    Is there anyway I can do this where The cell that's being copied is on a different sheet than the destination of the paste?


    Help please!
    Last edited by Mordred; 08-17-2011 at 11:50 AM. Reason: recieved warning

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    Apparently I can't say
    MS-Off Ver
    Apparently I can't say
    Posts
    8,274

    Re: With's and end withs sheets and copying.

    With Sheet1
        .Cells(.Rows.Count, 2).End(xlUp).Offset(1, 0).Value = Sheets("Some other sheet").Range("A1").Value
        End With
    for example.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0