lastrow2

  1. D

    Table headers being replaced when copying to it from another table

    I have some vba code that copies rows from a table to another table on another sheet. The headers for columns D, F and G on the destination table keep being replaced with column1, column 2 and column 3, instead of being left the as they are. I can't see where it is doing it in the code. Could...
  2. D

    Copying from one table to another

    I have some code that used to copy certain columns from every record in a table on one sheet to new rows of a table on another sheet. I didn't change anything but it has stopped copying the rows when I run the code. This is the code: Sub cmdSend() Application.ScreenUpdating = False...
  3. P

    Mixing text and times

    Hi All I'm have a problem combining two columns into one. The code below does what I want Sheets("Calculations").Range("K2") = Sheets("Calculations").Range("J2").Value & Sheets("Calculations").Range("I2").Text J2 contains a value and I2 contains the time and works as in it displays:-...
  4. D

    Move row then delete blank

    Hi all, could someone help me mod this to delete each blank row after it has moved the data to another sheet. Currently, it works when there is only one "Y" marked row but, if there are multiple rows, it does not delete any of the blank rows. Sub Move_Closed()Dim Check As Range, rng As Range...
  5. D

    VBA mod

    Hi all, can someone help me to mod this so that when the rows identified are moved to another sheet the subsequent blank row is deleted from the source table, please? Sub Move_Closed()Dim Check As Range, r As Long, lastrow2 As Long, lastrow As Long Application.ScreenUpdating = False lastrow =...
  6. J

    HTML VBA p tag

    Trying to pull the piece in bold below in the HTML for the following URL: https://www.tesco.com/groceries/en-GB/shop/fresh-food/all?include-children=true&page=1 <div class="tile-content" id="tile-253558119" data-auto-id="253558119"><div class="product-tile-actions--has-no-text"></div><a...
  7. 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()...
  8. D

    Object variable or with block variable not set

    I have some code that was working and I don't think I have changed anything but now it is giving me the error "Object variable or with block variable not set" This is my code: It is highlighting this line lastRow2 = desWS.Range("A:A").Find("*", searchorder:=xlByRows...
  9. D

    Type mismatch

    I have this code that is run once a command button is clicked: Sub cmdSend() Application.ScreenUpdating = False Application.EnableEvents = False Dim desWS As Worksheet, srcWS As Worksheet, clientWB As Workbook Set srcWS = ThisWorkbook.Sheets("NPSS_quote_sheet") Set...
  10. D

    Need names also sent to another workbook

    I have a spreadsheet for calculating services performed for clients. My supervisor wants to be able to create another spreadsheet that is used to record all the clients that have used the service. I have a button that copies from a sheet, NPSS_quote_sheet to another sheet, Costing_tool in the...
  11. D

    extra line being made

    I have a table that when filled out is copied to a table in another sheet. The first time the table is copied, it will also make a blank table entry at the bottom of the table on the destination table. Someone helped me with some code to remove the extra blank row but it appears to have come...
  12. U

    Command Button To Move Data W/O Formulas

    I have a complex situation here because there are a lot of moving parts in my workbook. I have sheet names Data, Active, Report, H and Completed. I have a command button the moves my completed row to the Completed sheet and deletes the empty row in the Data sheet. My problem is that the formulas...
  13. C

    Finding the second empty row

    Hi, I have a code to copy and paste values till first empty row but then I want vba to copy and paste values after that till it find second empty row. So For first I did Lastrow = Cells.Find(What:="*", After:=[A20], SearchOrder:=xlByRows).Row Range("A1:H" & Lastrow - 1).Offset(19, 0).Copy...
  14. D

    VBA code to copy in a mirror image

    I have some code to copy rows in a table (npss_quote) in one sheet (npss_quote_sheet) to a table (tblCosting) in another sheet (Costing_tool). In npss_quote there are 3 rows of data and when I copy them to tblCosting they become 4 rows. The forth row is blank with zeros but I want it to be a...
  15. D

    what does this code do?

    What does this line of code do in the following procedure? With srcWS.Range("A:A,B:B,H:H") Private Sub CmdSend_Click() Application.ScreenUpdating = False Application.EnableEvents = False Dim desWS As Worksheet Dim srcWS As Worksheet Set srcWS =...
  16. O

    Delete Row if It Equals "Delete"

    Hello and thanks in advance for your help and if it works, I will provide feedback. I'm trying to delete the rows if the value in the cell in Column B is equal to delete, but I'm getting an error on " If Cells(i, 2).Value = "Delete" Then Cells(i, 2).EntireRow.Delete" Here is the code. Sub...
  17. E

    Change code to search multiple terms across columns

    Hello, I have this code that I need modified to search more than one term at a time. I need it to search everything from columns A to P. Here is the code: Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B2")) Is Nothing Then Exit Sub...
  18. V

    Selecting Group of Rows with spaces in between

    Hi, I have a s/sheet which has multiple blocks of Rows. I used Lastrow to get the last row and the Startrow to get the last block of rows. However, I am unable to select two other blocks above the last block. There is a single blank row in between these rows. Lastrow = .Cells(.Rows.Count...
  19. H

    VBA puts formula into dynamic range

    Hi, I have no idea why this won't work. I get an application-defined/object-defined error. I have wsC defined earlier in the code. Range1/2/3 are Defined Name Ranges in the workbook. Any help is appreciated. Dim lastrow2, LastColumn As Long LastColumn = wsC.Cells(2...
  20. H

    Macro not working when new parameter added

    So, I've been working on this for quite a while with no luck. All it's supposed to do is merge two files together. It works until I add a new parameter (location). I've tried several variations on the code with no luck. Do I have to add another VLOOKUP? 'Opening Source Files...

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