+ Reply to Thread
Results 1 to 5 of 5

User Select Destination Cell

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    User Select Destination Cell

    Hi, I have some simple code to copy a range from one worksheet to another:

    Please Login or Register  to view this content.
    I want to change the code so that instead of pasting to "AF27" the user can select the destination cell each time the macro is run.
    How can this be achieved?

    Thanks for your help.
    Last edited by pike; 11-14-2011 at 02:32 PM. Reason: add code tags for newbie

  2. #2
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: User Select Destination Cell

    Please Login or Register  to view this content.
    Last edited by Whizbang; 11-14-2011 at 03:43 PM.

  3. #3
    Registered User
    Join Date
    08-23-2011
    Location
    NYC
    MS-Off Ver
    Excel 2019/O365
    Posts
    60

    Re: User Select Destination Cell

    Can you post a sample of the excel workbook you are working in?

  4. #4
    Registered User
    Join Date
    11-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Smile Re: User Select Destination Cell

    That's what i was after.
    Many thanks for your help. Much appreciated!!

    I have gone on to develop the code further for my needs.

  5. #5
    Registered User
    Join Date
    11-14-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: User Select Destination Cell

    Using this code:
    Range(Slct.Columns(4).Rows(1).Address & ":" & Slct.Columns(5).Rows(4).Address).Delete Shift:=xlToLeft

    i modified it to paste a copied cell in to cell ranging between Columns(1).Rows(1) and a given value for column (x) defined by another cell:

    ws1.Range("C3").Copy
    ws1.Range(Slct.Columns(1).Rows(1).Address & ":" & Slct.Columns(ws1.Range("E3").Value).Rows(1).Address).Paste


    Is there an easy way to use the SUM of 3 cells for the select column value I.e.:
    ws1.Range(Slct.Columns(1).Rows(1).Address & ":" & Slct.Columns(ws1.Range("E3").Value + ws1.Range("E4").Value + ws1.Range("E5").Value).Rows(1).Address).Paste

+ 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.6.0 RC 1