Simple Copy / Paste Formats & Values

Toballou

New Member
Joined
Apr 21, 2019
Messages
2
I have scoured the internet, and can't find anything that I can decipher that is even close to what I need, although all of it seems to work for others.

This is what I have:
Sub App_Mig_Status()
Workbooks("Recieving.xlsm").Worksheets("Recieving_Data").Range("A2:AS2001").Value = Workbooks("Sending.xlsx").Worksheets("Sending_Data").Range("C9:AU2008").Value
End Sub


First let me explain that I am pulling from a "Report" that is generated by someone else, and that takes about 2 hours to run, so I am not wanting to re-invent that wheel.
The above code copies the values, but there is formatting in each of the fields that I need to be able to filter on.
I can manipulate this to do a straight copy, however something in their code breaks the auto filter option's I have setup, and the one's I am trying to setup by Cell Color. (I have that code also)

However I can't figure out how to manipulate this to do a copy / paste of Values & formulas so I can try and do the auto filter that I need to do.

Help - Please!

T.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
.
First of all, you have a spelling error that may be affecting your code :

Code:
[COLOR=#333333]"Recieving.xlsm"[/COLOR]

Should be : RECEIVING




To receive assistance on the issues, you'll need to at least post your code. However, having the workbook to download
from a cloud site (DropBox.com, etc) is the best way to accomplish it.
 
Upvote 0
@Toballou, what happens with the code below? Please note that I left the spelling mistake as is in case your sheet tab and Workbook name do also have the spelling mistake.

Code:
Sub App_Mig_Status()
    Application.ScreenUpdating = False

    Workbooks("Sending.xlsx").Worksheets("Sending_Data").Range("C9:AU2008").Copy

    With Workbooks("Recieving.xlsm").Worksheets("Recieving_Data").Range("A2")
        .PasteSpecial xlValues
        .PasteSpecial xlFormats
    End With

    With Application
        .CutCopyMode = False
        .ScreenUpdating = True
    End With
End Sub
 
Last edited:
Upvote 0
@MARK858 This worked PERFECTLY!! Thank you for the simple code. This did exactly what I needed, and now I can move on to doing all the other things I need to do to this sheet. Again Thank you!

As to the typo, it was an error made in haste, due to needing to rename things and the fact that I suck at spelling.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top