selection.pastespecial

  1. S

    Combine two vba code snippets

    Hello all, I have a rather big area (A1:CJ311) with some cells having Borders on all sides, some cells collectively have a thick box border etc. Most of the cells have formulae in them. I want to copy the whole range("A1:CJ311") to another location with just the bordering formats of the cells...
  2. D

    Is it possible to be able to tidy and make my code quicker?

    Hi, I have a list box with the 52 weeks of the year in listed as WK 1, WK 2 and so on up to WK 52. So when a week is selected from the listbox all the data is copied from that week sheet on to my current weeks data sheet. Here is part of my code. Its is all the same apart from the week...
  3. R

    VBA to copy and past based on a dynamic range

    Hello All Experts, I have a standard template column A-D and variable value column G-H. I would like to copy and past a variable value into a standard template then repeat it until the last row of variable value. After some searching within the board, I could came up with below codes but...
  4. gssachin

    Copy diff cells in next worksheet

    HI, I want to copy diff cells (i.e. B2, D99 & E99) to another sheet in Column A2, B2 & C2 and every time it will get updated below (not overwrite) i.e. a3, b3, c3 etc I write following code but need to short one Sub Macro1() Dim wss As Worksheet, wsf As Worksheet Set wss = Sheets("VAC_EML...
  5. D

    Copying and pasting using VBA when not on that sheet

    I am trying to copy and paste information on another sheet that isnt the active sheet. Here is my code It is giving me the error on the first line and im not sure why. Sub Copy_Paste() Sheets("Dough Information").Range("H3:J152").Select Selection.Copy Sheets("Dough...
  6. K

    Import *.csv formatted multiple files from folder in to excel

    Using Excel 2000</SPAN></SPAN> Hi,</SPAN></SPAN> I have created one folder on desktop and named "csvfiles" when I receive a new file I just add into this folder (in the same folder I have put one excel workbook named "csvfilestoexcel" </SPAN></SPAN> I want I code when I open...
  7. gheyman

    Code that only works when it is run from a certain tab

    I have code tied to a userform (on the form I have a run button which runs the code). If I launch the Userform from one tab, the code runs great. If I launch the Userform (via a button) from another tab it errors out. (run-time error'1004': Select method of range class failed) It errors on...
  8. A

    How to repeat VBA and paste result in next row

    Hi am new to vba. How to repeat the commands below and paste results in row C8, C9, etc. Thanks. ' Sheets("Rand").Select Range("A1").Select Calculate Range("A1:A8").Select Selection.Copy Range("A12").Select Selection.PasteSpecial Paste:=xlPasteValues...
  9. D

    Method of Rand Class Failed

    Below is my VBA that I am using and it is telling me that the line in red is the error. I understand that it is trying to select a cell on the Summary tab of my workbook and then delete the data sot hat is can come back with new data to paste in its place. We have been running this for months...
  10. B

    xlPasteFormats Not working in Office 365

    Hi I have the code below in Office 365. The issue that I have are that it didn't want to copy the format correct, even if I add the following code. Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False If I run this code...
  11. D

    Macro Help Archive Data

    Hi Everyone, I am attempting to copy data from one sheet to another. My copied data is A3:R52. However, i want it to paste the data at the next empty cell given there are not values everytime in A3:R52. Here is my current code: Range("A3:R52").Select Selection.Copy...
  12. R

    Stepping through this macro works perfectly, but I get a runtime error every time I run it.

    Hello all, the "problem area" is highlighted in Bold. We've tried extensively to fix this including aliasing all sheets and variants of "ActiveWorkbook.Activate" Sub Produce_Report()' ' Produce_Report Macro ' ' Application.ScreenUpdating = False Application.Calculation = xlManual Dim F...
  13. M

    Excluding worksheets from a Macro

    Hi there - bit of an Excel novice, but trying to get a Macro I have on a document updated so it ignores a few of the worksheets. The sheets to be ignored are just data, and the macro in question is a simple copy & paste job for some monthly tabs we have further in the document. Have tried to set...
  14. G

    VBA lookup empty cell and paste value

    Please help me with looking up the empty cell and paste value in the next cell. Windows("Warehouse Schedule.xlsx").Activate Range("C5:M170").Select Selection.Copy Windows("Attendance Report.xlsx").Activate Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone...
  15. R

    Index/Match Macro.

    Hello, I am trying to write a code that will do the following: - Search column A in sheet2 for a match to ABC in the code provided. - if there is a match in column A then select the value in column B of the corresponding row - The value in column B to be use as an additional name in the new...
  16. J

    Filtering and copying a sheet to another sheet... not working as planned!

    Morning all, I'm trying to filter a sheet and then copy the filtered data to another sheet. What I've got below works but it balloons the size of the workbook up to 180Mb! I'm assuming it's because I'm copying the entire columns rather than just the filtered data...? Any thoughts on a better...
  17. V

    Short code

    ANy other way to write this code.. ActiveWorkbook.Sheets("Sur").Columns("R:R").Select Selection.Insert Shift:=xlToRight Columns("S:S").Select Selection.Copy Columns("R:R").Select Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False...
  18. C

    VBA Loop that copy range values then paste. Do to all sheets

    I created a macro that will copy all the values from each month and paste it to [column AK]. The current code is static with fixed ranges and I force to run the macro (using alt+f8) on every sheet since I have multiple sheets. I'm trying to find a way that will make my codes shorter and more...
  19. V

    Need code to be Shorten

    can any one please shorten this code in professional way please.. Sub datacollect() Application.ScreenUpdating = False Application.DisplayAlerts = False Sheets("Surety").Visible = True Sheets("Lossrun").Visible = True Sheets("OPT").Visible = True Surety...
  20. T

    Copy Multiple Cells to an Ordered List & Clear

    Hello My code that copies data from cells to an ordered list, then clears the original cells, and then copies data from the list to a different position on the form...essentially rotating the data. I believe my code is very clumsy and not efficient. I am hopeful someone can provide some...

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