+ Reply to Thread
Results 1 to 10 of 10

Copy a range WITH formatting and values

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    South Pole
    MS-Off Ver
    Excel 2010
    Posts
    99

    Copy a range WITH formatting and values

    Hi I'm in need of a macro that copys a range (A3:H5) to the active cell selected but cannot get it to complete this. Can someone please help me out? This is the code I'm currently using:
    Please Login or Register  to view this content.
    But this will only copy the row above it and insert it right below.
    Last edited by janschepens; 03-09-2012 at 03:18 PM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need a macro to copy a range WITH formatting and values please help!

    janschepens,

    (OP wrapped code in code tags - thank you)
    Give this a try:
    Please Login or Register  to view this content.
    Last edited by tigeravatar; 03-09-2012 at 04:36 PM.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-30-2010
    Location
    South Pole
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Need a macro to copy a range WITH formatting and values please help!

    thank you so much this works but fails in the center of a sheet. i need it to be able to insert into the middle of a spreadsheet without overwriting existing data for example: insert copied cells would be ideal to assign this macro button to

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need a macro to copy a range WITH formatting and values please help!

    What about just:

    Please Login or Register  to view this content.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Registered User
    Join Date
    07-30-2010
    Location
    South Pole
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Need a macro to copy a range WITH formatting and values please help!

    Winon your code is perfect except it does not insert into the middle of a spreadsheet. Can you please help me with this last detail? Can we some way make it to do "Insert copied cells?"

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need a macro to copy a range WITH formatting and values please help!

    Hello janschepens,

    Do you actually mean that you want the macro to insert additional rows, and then paste the data?

  7. #7
    Registered User
    Join Date
    07-30-2010
    Location
    South Pole
    MS-Off Ver
    Excel 2010
    Posts
    99

    Re: Need a macro to copy a range WITH formatting and values please help!

    Hi Winon,

    I want to paste the copied data into the selected cell and have the data/rows below it move down automatically and remain untouched.

  8. #8
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Need a macro to copy a range WITH formatting and values please help!

    janschepens
    Please Login or Register  to view this content.

  9. #9
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need a macro to copy a range WITH formatting and values please help!

    @ tigeravatar,

    Thank you. Nothing wrong with that.

    You were just a bit faster than me, while I was looking at something else.

  10. #10
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Need a macro to copy a range WITH formatting and values please help!

    Hello janschepens,

    I am quite confident that your problem is now sorted out. Please test the code you were given and if you are satisfied, then please see the notes at the bottom of this Post.

    Thank You.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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