copy & paste range in vba

  1. BPW

    Copy variable range from one worksheet and paste values into second worksheet at the next empty row below.

    I was wondering if anyone would be able to help me get un-stuck with a wrinkle in my macro. What I'm trying to do is copy a variable range on WS1 and paste values to another sheet at the next empty row below. The idea is to enter data in WS1 and click a button that will copy that data and...
  2. J

    Paste Filename to Range - VBA

    Currently I am looping through all files in a folder to grab certain columns based on the headers and pasting them all to a new master worksheet. Currently I have a hyperlink being pasted at the end of each "section" by offsetting column B by .Range("B" & Rows.Count).End(xlUp).Offset(, 1) . I...
  3. B

    VBA: Issue with find, copying & pasting across two worksheets

    Hello, I have a problem with some find, copy and paste coding. On a userform, there is a listbox for the academic year (acad_year) and a textbox for the unique record id (id) which supplies the two variables for this part of the coding. Both of these are working correctly and storing the...
  4. A

    Loop Through All Files, Manipulate and Copy Data to Summary Workbook with VBA

    Hi all, I am working on something to help me analyze a bunch of queries in an Access database. To motivate this I exported all the queries to .csv in a particular folder. I want the output to be in a format so that I can filter on the query and pull up the associated SQL statements for quick...
  5. S

    VBA - copy & paste from a cell on one worksheet to another worksheet by double clicking

    Hi All, I have a spreadsheet with two worksheets. what i would like to do is when a cell within column D on worksheet 2 for example is double-clicked on, it will copy the data from that cell into cell B2 on worksheet 1. Likewise, if possible, I would like to make it so that double clicking on...
  6. J

    Copy rows to different sheets if sheet name matches with Text of A column Tweak required

    Sub CopyRowDemo() Dim Rw As Long, LstRwRaw As Long, NxtRwDest As Long Application.ScreenUpdating = False LstRwRaw = Sheets("Raw Data").Cells(Rows.Count, "B").End(xlUp).Row For Rw = 3 To LstRwRaw With Sheets(Cells(Rw, "B").Value) If .Range("B6") = "" Then NxtRwDest = 6...
  7. J

    Code not looping through multiple sheets as intended - VBA

    Hello, I am using the following code to copy/paste a range from one worksheet to multiple sheets. But, my code is only pasting the range onto the sheet that is currently open. Any thoughts on how to get it to copy paste to all sheets that begin with "Labor BOE"? Here is the line in my code...
  8. J

    date today formula 1004 error in vba

    Columns("U:U").Select Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove Range("U1").Value = "Data" Range("U2").Select ActiveCell.FormulaR1C1 = "=DATE(Month(TODAY())&Date(TODAY()-20)& &LOW&L2&_INV&S2" Selection.AutoFill...
  9. R

    macro to copy past based on header

    Hello i have put together a macro with help of google which works fine . i have a request that i am able to find on google, with the below code i am able to copy paste from sheet to another , only thing is the range is fixed like A, C , B , E and I .. i would like the range be based on the...
  10. B

    Copy & Paste Using Defined Name Ranges

    Hi Guys, I was just wondering if anyone knows how I can adjust the below code so it will Copy Cells B21 & C21 On sheet 1 To A Range Defined in B7 The range is on sheet 2 and is the users name Sub CopySheet1A1toSheet2NextCellInColumnA() Dim LastRowSheet2 As Long LastRowSheet2 =...
  11. J

    Making a list

    Hi, am having trouble looking up info, but particularly making a list that looks different from the list I extract infofrom. I have tried VLOOKUP with no success, but am working on using .find andoffset, but am having trouble making a list without leaving blank rows.<o:p></o:p> <o:p> </o:p> What...
  12. J

    Excel VBA to paste to new line after entry

    I'm trying to make a sales quotation entry process simpler by using macros. This code below works, but it goes horizontally across the sheet instead of going vertically down the columns. I have dynamic data (from vlookup) generated in cell G3 and I've made a button to copy this data from G3 and...
  13. N

    How to use a cell value as an input for a sheet name in VBA

    I am trying to copy data from one worksheet to another using VBA. This is the code I currently have: Sub sbCopyRangeToAnotherSheet() Sheets("Active Worksheet, A2").Range("Q1:S52").Copy Destination:=Sheets("Analyst").Range("B3") End Sub I am trying to link the sheet name in my VBA code to the...
  14. M

    Excel VBA Copy and Paste Code Error

    Hi I'm trying to write a code that will copy data from one workbook and paste it to another. I'm inexperienced with coding, so I copied a code I found online. I tired to add some lines that would allow the user to choose any workbook to copy from. Once I added these lines I got this error...
  15. R

    VBA to Add and remove new Section

    Hi all, I honestly have no idea where to begin with this so was hoping someone could help me out. What I am trying to achieve is have two buttons, 1 of which (New Item) will make a copy of the section in my sheet from A11:I20 and insert it below with the item number etc blank ready for a new...
  16. A

    Selecting same column in multiple selection vba

    Hi All, I have two questions Q1 :Can we Specify same column in multiple selection range for Example : Range("A2,B2,C2,A2,B2) and paste in the other sheet ? Q2 : Can we specify blank columns in the multiple selection for example : Range("A2,"",B2,C2,"",D2) and paste in the other sheet ...
  17. G

    copy newest entry to new row and add value to current balance

    I would like to copy the entries from D-F into columns A-C, but combine those entries summing the Awards given into a total balance. So if an $5 is given to Name1 then the new balance would be $35. Also, if Name3 is given an award would need to add the new name to the balance sheet. Then, I...
  18. P

    Questions that copy themselves into another file when answered?

    Hello, This might be a bit complicated: I am preparing a checklist with many sheets and hundreds of "yes/no" questions. The questions are to be answered by choosing between option buttons (there are two per question). I am trying to program each "no" option button (any alternatives?) so that...
  19. T

    Copying data and formula from one workbook to another

    I am trying to copy from a workbook that has a single sheet called 'Lookup' to my local workbook using vba in excel2003 (for macros issue). When I use the code below, I get the entire sheet data, but not the formula is a couple of columns. Workbooks.Open...
  20. M

    Copy sheet from pat to specific sheet

    Hi all, This is a lot to ask but i am really stuck at this point. I almost completed my file but I am looking for a solution. I have a partlist for every product (named as Aricle 1,2,3,etc). This file contains 1 sheet with like 20 rows of data. I am looking for a way to copy the data from...

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