+ Reply to Thread
Results 1 to 8 of 8

Macro to copy cells from a selected range and just paste values back to that same range

  1. #1
    Registered User
    Join Date
    07-19-2017
    Location
    united states
    MS-Off Ver
    2007
    Posts
    31

    Macro to copy cells from a selected range and just paste values back to that same range

    whats up everybody.

    I am currently trying to write a VBA macro that will allow me to use a button click to copy a selected range and paste only values in that same selected range. I am using a today() function and it will change the date come tomorrow, and I do not want the dates to be changed for today.

    It will vary by day between 1 and 100 so I figure the best way is just have a user select the range and just turn that range into values only so it keeps by date, but will keep my formula in the rest of the column.

    If you need me to send what I currently have, let me know, but it does not work lol

    THANKS IN ADVANCE!!!!

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    .
    This will copy everything in cells "A1:H24 " and paste only values back to same.

    Please Login or Register  to view this content.
    Last edited by Logit; 01-18-2019 at 02:44 PM.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    I would suggest something like

    Please Login or Register  to view this content.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  5. #5
    Registered User
    Join Date
    07-19-2017
    Location
    united states
    MS-Off Ver
    2007
    Posts
    31

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    This is exactly what I am after, but instead of using cells "A1:H24", can I make it so cells A1:H24 can be selected by the user highlighting a specific group of cells?

  6. #6
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,008

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    .
    If you want the User Selection method, use Mumps macro. I've added something to clean up the view after
    pasting :

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    07-19-2017
    Location
    united states
    MS-Off Ver
    2007
    Posts
    31

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    PERFECT, thank u, I knew it must have be easy, I have not learned Selection before, will that always use highlighted cells?

  8. #8
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro to copy cells from a selected range and just paste values back to that same rang

    Yes it will, "Selection" IS the highlighted cells

    Thanks for the rep and for marking the thread as solved!

+ 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. Replies: 0
    Last Post: 09-17-2017, 06:30 PM
  2. [SOLVED] Copy a range, and then paste back the values only.
    By Angry Robot in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2017, 12:42 PM
  3. macro to copy range of values from excel to a selected book mark in WOrd
    By kmksprasad in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 12:47 AM
  4. MAcro to copy paste a certain range of cells in multiple tabs as values
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2013, 03:59 AM
  5. Excel macro to copy paste a particular range of cells as values in multiple tabs
    By rshnkmr39 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2013, 03:06 PM
  6. Copy selected cells from a range of worksheets and paste in master table
    By simba3088 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2012, 07:59 AM
  7. Change range of cells within VBA macro and copy and paste to fixed cell range
    By Mannyny in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-20-2012, 11:51 AM

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