selection.copy

  1. Eskypades

    Macro crashes on Mac but works on PC

    I have the following code in my worksheet (forgive the crude coding). It works just fine on my PC but when I send the worksheet to my client and he runs it on a Mac, it crashes Excel. The crash report is 48 pages long and includes the following error message: "Error Signature: Exception...
  2. E

    PasteSpecial method of Range class failed

    I used the macro recorder on a protected sheet to copy and paste and I am getting the following error if someone can please tell me how to get rid of it please....thanks for any help Wb.Sheets("Test1").Range("F5:H5").Select Application.CutCopyMode = False Selection.Copy...
  3. A

    Turn existing VBA code into a loop

    Hi, I have the current VBA code below which I would like to turn into a loop: Dim NoYrs As Long 'number of years Dim LRbf As Long 'last row NoYrs = Sheets("Lists").Range("E655536").End(xlUp).Row - 1 LRbf = Sheets("BF").Range("A655536").End(xlUp).Row ' Get First batch...
  4. C

    Help with VBA code

    I am trying to copy a range from one sheet and paste it at the next available row on another sheet. My code is as follows. Sub Archive() Sheets("Data Entry").Select Range("A3:AC31").Select Selection.Copy Sheets("Data Archive").Select Range("A" & Rows.Count).End(xlUp).Offset (1)...
  5. A

    Copy from the next row with macro

    Hi, i record a new macro but i faced a problem when i click the button to copy a cell value in the first row from sheet "Marge Carburants" to sheet "recapitulatif" it's copy just the first row and didn't jum to the next cell when i click the button to add an other row in sheet "recapitulatif"...
  6. P

    VBA Copy Paste to another WS not working

    I am not understanding why my copy from one ws (entire ws) to another Ws is not working. Please help Thanks Sheets("ChargeDetail8").Cells.ClearContents Sheets("ChargeDetail7").Cells.Select Selection.Copy Sheets("ChargeDetail8").Select...
  7. P

    Create Macro

    Hi, I have a VBA code,I want to run 200 times for every next row.but I can't.please help. Sub Test() ' ' Test Macro ' ' Range("Q3").Select Range(Selection, Selection.End(xlToLeft)).Select Selection.Copy Sheets("Creator").Select Range("A2").Select...
  8. P

    sheet copy vba copy/paste cells as value

    hello, this code copies a master sheet and turns several cells from formula to value. i have since needed to add a few more cells to "copy/paste as value" how do i add AL11 to paste as value? Sub SheetCopy347() ' ' SheetCopy347 Macro ' ' Sheets("Master 347").Select...
  9. S

    copy and paste by using formula with help of VBA

    i have some data in A5 TO H500 in photos sheet ,which i want to copy them in gallery sheet in same location,this code need some modifiaction Sub INPUTDATA() Worksheets("photos").Activate Range("A5").Select ActiveCell.FormulaR1C1 = "=IF('gallery'!RC="""","""",'gallery'!RC)"...
  10. F

    Run a macro automatically when there is a data in a certain Cell

    Hello, I don't know how to use a macro. I am more on a formula type of guy. Can you please help me? I have a macro in place in my file but I need it to run automatically when a data is encoded or paste in a certain Cell. I have made the macro using the record button. For it to work is for me to...
  11. D

    Skip a line of code if a number is contained in new workbook

    Sub VOPSRELATIVE() ' ' VOPSRELATIVE Macro ' ' Keyboard Shortcut: Ctrl+Shift+R ' Number = ActiveSheet.Cells(14, 1) lastrow = 13 For Each c In Range(Cells(14, 1), Cells(Cells(Rows.Count, 1).End(xlUp).Row, 1)) If Number <> c Then Exit For lastrow = lastrow + 1 Next...
  12. D

    Select data based on criteria in VBA

    Right now the code I have takes the data I've selected and moves it to a new sheet then I have to save, it's a great code. Doing this around 300 times seems like there should be a better way. I'm always selecting my data based on the number in column A so if there are a list of different numbers...
  13. H

    Refresh Pivot and select name from drop down box

    Hello, I have a repetitive task in excel, I need to refresh a pivot table select the name and copy and paste data. This is what I have done so far. Sheets("Pivot").Select Range("B15").Select ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh...
  14. H

    Apply to different name

    Hello, I have recorded this VBA, but I need it to apply to a different Name. Sub Macro2() ' ' Macro2 Macro ' ' Sheets("Pivot").Select Range("C21").Select ActiveSheet.PivotTables("PivotTable1").PivotCache.Refresh...
  15. J

    Format lost when re-opening VBA created workbook

    Hi all, I've created some coding to create a number of worksheets, to then move each sheet to its own workbook and save the file in a specific location. It works fine but for one small annoying problem. There's a cell that contains a number format which is present as the file is saved; it...
  16. I

    How to select ranges from multiple rows

    I want to copy the same thing into different rows in Excel. How can I simplify the code below so I can select multiple ranges? <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit...
  17. D

    Macro Error: Copy, Insert, Paste and Clear the Merged Cells from the previous row

    I am trying to make buttons at various places within my worksheet to do the same thing (add rows). When I write the first macro for the button it works like a charm but when I copy it to the second button I get errors. The only thing that should change is where the blank row is inserted. Can...

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