lastrow2

  1. A

    Create subtotal as currency

    I have this bit of code that creates a subtotal line: 'Add Total row Job Report Dim lastrow2 As Long lastrow2 = Cells(Rows.Count, "I").End(xlUp).Row Cells(lastrow2 + 2, "I").Resize(1, 31) = "=SUBTOTAL(9,I2:I" & lastrow2 & ")" With Range("I" & lastrow2 + 2...
  2. D

    Adding to existing macro - moving rows to new sheet if yes

    Hi everyone, Months ago, with the help of this forum, I created the below macro to copy all the documents flagged "Yes" in my Cases worksheet over to my High Priority sheet. It's been working great. Sub Test() Dim m As Variant Dim MatchRow As Long Dim Cell As Range With Sheets("Cases") For...
  3. K

    Data extraction based on condition

    Sub transfer() Dim i As Long, j As Long, lastrow1 As Long, lastrow2 As Long Dim myname As String lastrow1 = Sheets("sheet1").Range("A" & Rows.Count).End(xlUp).Row Worksheets("Sheet1").Select Application.ScreenUpdating = False For i = 2 To lastrow1 myname = Sheets("sheet1").Cells(i...
  4. H

    Need to create new sheets and move data to each sheet

    Hello, I was hoping that someone could point me in the right direction. I am decent with macros, but creating them from scratch is where I struggle. I enjoy learning how to adapt code that I find on this forum and making then work for my needs. This time, I have a situation where I have two...
  5. B

    VBA to find a specific text in a column and add a row above it and loop

    Hello, I am having some trouble writing up a code on how to find a specific text in column A, then once found it will add a row above it. The problem is that there can be more than one of the same text in that column so I would probably need to loop it too. Application.ScreenUpdating =...
  6. R

    Mapping Data From Source Sheet, Where Multiple Criteria is Met

    I'm trying to identify each row in a worksheet, where a certain condition exists, then map information from that row(s), to another worksheet. The below code is giving me a Type Mismatch error at the line in red font. What do I need to correct in this code; or should I be taking a different...
  7. R

    Optimizing Coding Structure and Workbook Speed/Functionality

    I need some guidance on how to best approach a situation. I have a workbook that will have 40+ sheets. One of the sheets is mean to serve as a Summary sheet, containing data from the others. In creating this summary sheet, I enter a slew of formulas (from column F through column BV). This...
  8. E

    Copy row if 14-17 digis is exact..

    hello, I need to copy row to new sheet based on column M with long number and I like to copy it only if 14-17 digit are 2005, 2025, 2026 and couple more. my code is: Dim cell2 As Range Dim lastRow2 As Long, j As Long lastRow2 = Range("N" & Rows.Count).End(xlUp).Row j = 2 For Each cell2...
  9. 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...
  10. cmschmitz24

    Move entire row to new worksheet based on cell data

    Hello, I need help refining a VBA code - I need to have the entire row for a specific data value in column I moved into a new worksheet. I am currently using this code, however it also deletes all the data rows underneath the rows that are being moved and that cannot happen. Dim Check As...
  11. B

    copy to other workbook

    Could use a little help attempting again here to copy if two criteria is met to another workbook. Using Code below Sub copyMC() Dim lastrow As Long Dim lastrow2 As Long Dim i As Long lastrow = Workbooks("Book10").Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row lastrow2 =...
  12. K

    Paste Data Below the Last Used Row not working

    Hello, I have a script that moves data from one sheet to another based on a criteria-- thanks to the help I got on this board :). It moves what I need perfectly, BUT It is supposed to move below the last line of data -line 232 for this so it should go to line 233, but is going to line 5004. I...
  13. D

    VBA - Move row(s) based on column cell value

    I am trying to move a row from one worksheet (Active opportunities) to a second worksheet (Archived opportunities) based on whether date(s) entered in column I are up to and including today's date. These dates in column I are forecast archival dates entered in the original worksheet sometimes...
  14. J

    VBA - Add argument in countif function - move rows

    Hi everyone, The code below aims to remove every row when the value in column M is 'Non Available' from sheet 'Summary' and put the entire row in another sheet 'Summarybis'. I'd like to add one argument in the countif function such as also removing every row with value in column M as 'To...
  15. 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...
  16. M

    VBA Loop Not Working Properly

    Hi Y'all, The code below inserts a matching function, to match cell values from one cell in Sheet1 to an array in Sheet 2. Then I created a loop that if the Match value > 0, to then take the whole row of that "i" value and paste into sheet 3. For some reason my loop isn't looking at all the M &...
  17. T

    VBA code check, and help

    Hello all I have written the following code to append new data into a sheet from another sheet. The code is as follows Sub AppendEPOS() ' ' AppendEPOS Macro ' Copy Data from the Converter into the EPOS ' Dim wb1 As Workbook Dim wb2 As Workbook Dim Sheet As Worksheet Dim PasteStart As Range...

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