+ Reply to Thread
Results 1 to 13 of 13

Copy values and paste as values WITHOUT SELECT

  1. #1
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Copy values and paste as values WITHOUT SELECT

    Hello,

    How can i copy paste 1 range of cells into another sheet without select.

    I had this:
    Please Login or Register  to view this content.
    Although this selects the destination range and i can't have that.

    I now have this:
    Please Login or Register  to view this content.
    The ranges have values but in the second one, it DOESN'T select, although doesn't copy nothing..

    I have the values in the "somar cores" Sheet, and want to copy them to my activeSheet

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy values and paste as values WITHOUT SELECT

    Exemple for 10 rows and 5 columns

    Please Login or Register  to view this content.

    Kind regards
    Leo

  3. #3
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Quote Originally Posted by LeoTaxi View Post
    Exemple for 10 rows and 5 columns

    Please Login or Register  to view this content.

    Kind regards
    Leo
    I Need to use the variables...

    MetrosLinearesporCores = Worksheets("Somar cores - não apagar").Range("A5:BA5")
    NrColPrimeiraCor = 18

    It's a number this last one.

    I need to copy the metroslinearesporCOres to nrColprimeiracor

    Hope you can help me out

  4. #4
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Already Tried:
    Please Login or Register  to view this content.
    But doesn't work..

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Copy values and paste as values WITHOUT SELECT

    Your first code is correct but you should write it like this

    Please Login or Register  to view this content.
    The fact that the destination cell or range remains selected is 'works as designed' it is is a nuisance but, we'll have to live with it

    È uma pena mais nõ tem outra solução

    Pode tentar esto:

    Please Login or Register  to view this content.
    This way you save the initial location and return to it
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  6. #6
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Quote Originally Posted by Keebellah View Post
    Your first code is correct but you should write it like this

    ....
    That's my last solution, cuz my activecell is not that one, it's 30 columns to left. But tomorrow there can be more or less.

    That's why i need this to NOT select..

    I can do that, although i need to do something like this:

    Please Login or Register  to view this content.
    I have to select the first column, in the active row. Is this correct?
    Last edited by brainzlp; 10-29-2015 at 06:49 AM.

  7. #7
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy values and paste as values WITHOUT SELECT

    works with variable also

    Please Login or Register  to view this content.
    Kind regards
    Leo

  8. #8
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Quote Originally Posted by LeoTaxi View Post
    works with variable also

    Please Login or Register  to view this content.
    Kind regards
    Leo
    The copy list will be flexible, can't the 53 be like a count A:BA automatic?

  9. #9
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    The problem i am dealing is that de A5:AB5 will be flexible, what i have now, the variable needs to be changed and i write mannually what is the Start and Finish.
    But wanted to have a countcolumn on that variable.

    Like:

    Resize(1,Count.columns(Range("A5:BA5")))

  10. #10
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Solved with this solution:

    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy values and paste as values WITHOUT SELECT

    like this

    Please Login or Register  to view this content.
    Kind regards
    Leo

  12. #12
    Forum Contributor
    Join Date
    07-20-2015
    Location
    Covilhã
    MS-Off Ver
    2010
    Posts
    516

    Re: Copy values and paste as values WITHOUT SELECT

    Thanks you. Works great.

  13. #13
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: Copy values and paste as values WITHOUT SELECT

    Oeps, i forgot the row number in previus

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Copy paste values to another workbook based on multiple cell values
    By Bazinga in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-23-2014, 12:41 PM
  2. Replies: 1
    Last Post: 05-14-2014, 12:52 AM
  3. Replies: 1
    Last Post: 02-12-2014, 05:29 AM
  4. Replies: 0
    Last Post: 01-29-2014, 07:38 AM
  5. Replies: 0
    Last Post: 09-06-2012, 04:06 AM
  6. find, select, copy paste values
    By gsrai31 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2011, 01:59 PM
  7. Copy Paste values between sheets - values incorrect
    By db41987 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-12-2010, 04:17 PM

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