lrow

  1. A

    Copy a selected row in a listbox and fill a column to last row

    I will try and explain this as best as I can... From a 2 column Listbox on a userform, I need to select a row and copy that row into a spreadsheet (columns C and D, from row 5 up to last row). I have attached some images so you have an idea of what I am trying to do. The code below will only...
  2. M

    Loop Thru Worksheets / MsgBox Rows disconnect

    Hi, There are 3 worksheets named A, B and C. I want to loop thru each WS and MsgBox Count of Rows and WS Name. Weird that I keep getting same count of rows from Worksheet A in MsgBox even though the other MsgBox pops up with the 3 different sheet names. What needs to change in code...
  3. rhino4eva

    Select and delete range

    Sub adam() Sheets("Tabulate").UsedRange LRow = Range("A" & Rows.Count).End(xlUp).Row Range("c2", "d" & LRow).SpecialCells(xlCellTypeBlanks).Select End Sub I use the above code to select blank cells in columns C & D I am having trouble...
  4. F

    Recording Cell Value

    Hi all, I have just used the following code, from this forum (Someone called Alan - Thanks Alan whoever you are!!), that does what I'm looking for. My only problem is, the code works fine if the data I enter into A1 is manual. But if the value in A1 in coming from elsewhere in the sheet, I...
  5. E

    Remove duplicates in certain order

    Hello, I want to remove all duplicates but keep the last one. I found this code and adapted it to my situation. But I got stuck because the code only compares and removes the next value upwards in order to keep the last duplicate and delete the rest. But I have 3, 4, 5 or more duplicates. Can...
  6. J

    Error with last table row (Run Time Error 91)

    Hi, i have this code for finding last used row in a table: Sub LastTableRow() lrow = Range("Table5").Columns(1).Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row Debug.Print "lrow :" & lrow End Sub This works great except for when the table has no data it outputs this...
  7. L

    Run Time Error 438 Object Doesn't Support this Property or Method

    Hello, I'm getting the error above when I try to run a macro to clear a report and reset things for the next time. Specifically it is supposed to unhide a sheet, turns off the advanced filter so the contents can be cleared, and hide the sheet again. I am running Excel 2016 on Windows 10. The...
  8. M

    Object Required

    Hi all, It could be that I've been at this for too long and I now can't see the obvious errors. I cannot get past the "object required" error - by the autofilter line- Any help will be greatly appreciated. [Code] Sub copysubpanel_NTC() Set FPNTC = Sheets("Full Panel NTC check") Set SPNTC =...
  9. A

    Combine Subtotal with CountIfs

    I have this vba code below that I'm using to count, but I would like to use subtotal to count the number of visible filtered data. Can someone assist? Thank you kindly. CCP.Caption = WorksheetFunction.CountIfs(Range("D15:D" & LRow), ">=" & "01/01/" & cbYr, Range("D15:D" & LRow), "<=" &...
  10. P

    Looping through HTML Elements

    Hey guys. I've been all over google, and can't seem to find what I'm looking for. I'm trying to loop through all the elements of a website, and record the element's ID. I'm not sure how to store the object's id. Here's what I got so far: Dim o As Object For Each o In IE.Document.All...
  11. E

    Populate an array with items in listbox

    Hi All, I have a user form with 2 list boxes, the left box is populated and the right is blank, users will select values on the left and move them to the right list box. When they hit the command button I want all the selected items in the right list box (ListBox2) to populate an array that I...
  12. N

    Using Match function and comboboxes in VBA

    Hi, I am trying to locate a specific row number using vba. I need it to be able to look at the contents of a combobox and search for this value in the worksheet and then return the row number that the function returns. Once I have this value (lRow) I can use this as a cell reference Using...
  13. W

    Why is the Else statement not working

    Hi all, I have a code which succeeds to do all the others except for the Else statement, could someone please be of help to me? Before i modified the code everything was working as they ought to but after some slight changes to make it more user friendly, the last Else statement stopped working...
  14. S

    Help with this VB code

    The below code works perfect taking what is in the form and adds it to a table on another sheet. Private Sub bOkay2_Click() Dim tbl As ListObject Dim ws As Worksheet Dim lrow As Range Dim lrow2 As Long Set tbl = Sheets("Missed Scan Summary").ListObjects("tblncidents") If...
  15. B

    Is lRow slowing my process?

    This code is used 28 times in my project. While it works, lRow appears to slow the process due to my poor development – many of the sheets have had data in cells well below the current used range. Some of the sheets run thru Next rCur over 5000 rows during processing. I believe the process...
  16. G

    VBA to extract top 10 values based on criteria

    I am looking at a response from VBA Geek here https://www.mrexcel.com/forum/excel-questions/795401-macro-extract-10-highest-values-1-column-onto-new-sheet.html I am looking for something identical - BUT adding in a criteria lookup on a column i.e. Top10 values IF column C = "X" Original...
  17. E

    Merge 2 cells for Range

    Hi All, I'm trying to merge 2 lots of columns into 1 column at the end of the data to provide a look up reference. The first column contains staff ID and the second contains question ID. My code is below and it just doesn't seem to work, I get a type mismatch but guides I've followed suggest...
  18. L

    find the last none empty column

    Hi The code below does not work on case like below when i have first few cells are empty for col 2 and 3. How can I fix that My case <tbody> 1 44 55 66 1 44 test 44 </tbody> the code below will say the last none empty column is #1...
  19. C

    If cell is equals value copy another cell

    I hope you can help me! I am struggling to get this function to work. I have a spreadsheet with X's on, as if they were ticks. Basically I need to copy cell A if F = x. Dim lRow As Long 'Determine the last Row. lRow = shTarget.Cells.Find("*", LookIn:=xlValues...
  20. A

    For lRow = 353 To 2 Step -1 what does this mean

    I am using this bit of code in my macro I found to nearly work but could someone please tell me what this means For lRow = 353 To 2 Step -1 does it only go down to row 353? I want it to work on columns B & C only, thanks The full code is: Dim lRow As Integer Dim intCol As Long Dim rngCell...

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