lastrow1

  1. Z

    copy to range problem

    [code] Sub checkwood() Dim i As Integer Dim r2 As Integer Dim lastrow1 As Long Dim woodcoasters As Range lastrow1 = Cells(Rows.Count, 1).End(xlUp).Row For i = 2 To lastrow1 r2 = 2 If Cells(i, 3).Value = Cells(14, 3).Value Then Range("A" & i).Copy Range("j" &...
  2. D

    extract data change and update changes back to data sheet

    Hi all, I have a code o extract data (works perfect) I now am trying to paste that data back to data sheet if changed. I have a command button I have attached below code, when I click I get msg "Compile error: Wrong number of arguments or invalid property assignment" Sub Pre_Alert_Update()...
  3. S

    copy and paste range in new other document

    Hi, I've been trying to copy a variable range of rows form one sheet to another. The other sheet already contains data so I've tryinging to append it with the count.row function. This is what I have so far: Lastrow = Worksheets("input").Cells(Rows.Count, 7).End(xlUp).Row...
  4. E

    Copy and paste to last row

    Hi all I have file want to copy data from 3 sheets to one, data need copy from range (B2:I) to lastrow of each sheet Finally sumtotal from lastrow from 3 sheet in lastrow of this sheets I coding like belove but not work, please help me Sub PL3PL7()Dim lastRow1 As Long, lastRowPL3BC As Long...
  5. M

    Copy method of Range class failed

    What am I doing wrong here? Sub Appenddata() Dim lastrow1 As Long, lastrow2 As Long Dim ws1 As Worksheet, ws2 As Worksheet Dim WB As Workbook Set WB = ThisWorkbook Set ws1 = WB.Sheets("ACT") Set ws2 = WB.Sheets("OFC") lastrow1 = ws1.Range("A" & Rows.Count).End(xlUp).Row lastrow2 =...
  6. P

    stuck with vba formula

    Hi All I'm having a problem with the code below trying to get the formula correct, I cant get the LastRow1 part correct. I've tried everything, the first part INDIRECT(""E"" & ROW()) is OK, it's the (INDIRECT(A1:""A"" & LastRow1)) bit I'm having problems with. Any help would be appreciated...
  7. T

    Can I edit this macro to only copy i=cells that are not hidden?

    Hi Everyone, I have this macro that works great but it copys cells with values even if the row is hidden, is it possible to copy only cells that are visiable? If not, or if its easier a macro that clear contents of all hidden rows would be fine Thanks Tony Sub Move_Values1()...
  8. E

    If cell contains letters R and P

    Hello, I like to copy row based on multiple conditions and I hacve a problem with letters. I like to check if cell in column O contains letters P and R, and if so, copy row to next sheet. my code is (with not working P and R) Dim cell1 As RangeDim lastRow1 As Long, i As Long lastRow1 =...
  9. E

    Copy rows based on char length

    Hello, I need help with macro to copy rows to new sheet based on length. if cell in column J has 9 or 14 characters than copy entire row to new sheet. I have something like this for another column and that is working but now I need length for another...
  10. F

    Look for match, copy if no match

    Hi Forum! I'm trying to copy all the values that are not found into column J. But get an error at the line Selection.Copy Destination:=Sheets(1).Range(lastrange).Paste Any ideas why? Option Explicit Sub codeforP() Dim lastrange As Long Dim lastrow1 As Long Dim lastrow2 As Long Dim business...
  11. T

    Password VBA

    Hi, My VBA pulls data from three different source files into one central location, however, there is now a password on the source files, so the VBA falls over. Is there a code that I can add in that will input the password once it gets to the right moment. Please see code below. Sub...
  12. L

    Refine a VBA script

    Hi guys I have written a VBA script that is quite lengthy. I've written it taking bits and pieces of seen others post, and then amended for my requirement. To aid performance and save on memory/disk space, can anyone help me (using your expertise instead of my newbie knowledge and) refine the...

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