lastrow

  1. S

    Extend Selection from the Active cell to last Row i.e Non Blank cell in the same Column (having few blank cells )

    Hi , Actually I was trying to run the subroutine to select a Single Column from the Active cell and Drag the selection to the Last Row (The Single Column and Multiple Rows are having some blank cells which are to be skipped). The code below doesn't give the desired result I would appreciate if...
  2. dommmm

    Clear contents down to last row but not header VBA

    Hi, I'm having a little problem. I'm trying to determine the last row based on any data in column J and then delete the contents of cells A2 to AZ* on that last row BUT if the sheet is blank apart from the header (ie the last row is 1), then I want it to stop as the code is deleting the column...
  3. P

    Excel VBA to Outlook Select Range lastRow

    Hey guys, I need for the code to stop copying at the lat line with data, but cant figure out how to code it. Pretty sure i need to use lastRow, but Im not sure how to replace the range. Sub Main() 'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm 'Don't forget to copy the...
  4. F

    Moving rows upwards ... one at a time

    Hi, I currently have some code that looks at data in row 2 of a worksheet. After pressing a button, the VBA pulls the information from the cells in that particular row, through to other cells in the workbook, it then automatically saves this info as a new document and then returns to the first...
  5. J

    VBA dynamic last row for multiple sheets

    Ok so I'm a bit frustrated with several failed attempts at this. I have a workbook with many worksheets. I have code to loop through each sheet (except one) and perform different calculations for certain rows. I then take those calculations and attempt to paste them 3 and 4 rows after the last...
  6. S

    Including LastRow within a formula

    Hi All, I have some code which creates a "score" line within my spreadsheet. I need this formula to change each time I run my macro, as the number of questions it relates to is variable. I have the formula: Range("B" & LastRow + 3).Value =...
  7. M

    database manager

    Hello, I explain my problem, I create a database manager, to use it is very simple, in the sheet BDD Chat you will find a button that opens the manager, once open you will find a combobox that lists the name of the lists, a listbox which lists the items within a list, 1 button add a list, 1...
  8. D

    VBA delete last row help

    Hello everyone. I am trying to piece meal my VBA where I need it to select all sheets in the workbook and delete the last row in each sheet. Each sheet has the same headers but varies in row so as long as it is the last row being deleted it will work. Any pointers would be greatly...
  9. P

    Using Lastrow

    I’m trying to learn to write a sub without having to continuously repeat the Range on every line of code by using the command Lastrow. Below is a simple example of a Range A1:H15. <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings>...
  10. D

    Autofill goes past Last Row, Last row identifies correct Row

    Hi I have done lots of Google searches and found nothing on this. Normally I can find an answer on Google, or force the code to do what I want by trying a different method. I have a VBA problem that is driving me nuts. I'm using End(xlUp) to find my last row. When I hover over Last row...
  11. H

    Excel VBA to rename filesname or folder

    Hi Any idea why this not working? :D Sub ChangeInFolder() Dim OldName As String Dim NewName As String Dim LastRow As Long Dim i As Long LastRow = Range("A65536").End(xlUp).Row For i = 1 To LastRow OldName = Range("A" & i).Value NewName = Range("C" & i).Value Name OldName As...
  12. A

    Setting data range and speeding up VBA code

    Hi, I have some simple VBA code which does not work the way I want. It's probably something simple. First, in the code LastRow = Cells(Rows.Count, "B").End(xlUp).Row I would like to start the row count at row B3 not row B1; tried several options but all returned errors. Sub Test2() Dim...
  13. sharky12345

    Efficient method to add hyperlink

    Afternoon guys, I'm trying to find an efficient method to add a hyperlink to a range of cells but what I have so far keeps generating an 'Out of memory' message. The code itself runs fine, but once it's complete I get the message. This is what I have so far: LastImportRow =...
  14. C

    Help fixing 'Subscript out of range' error

    I'm trying to teach myself about arrays and can't seem to figure this one out. (many Google searches) I have the following code that I'm getting a 'subscript out of range' error: <subscript out="" of="" range="">Dim LastRow As Integer Dim MyArray As Variant Dim i As Integer With...
  15. T

    Find the last row with data in it in a row of formulas?

    Hi Everyone, I have a small range of BJ28:BJ42 I want to find the lastrow that contains data, they all contain formulas so my normal lastrow method select every row, but the formulas have "(IF a21 = "","")" for example so some cell go "", I want the last row that has a value in it. Please help...
  16. sparky2205

    "Paste method of Worksheet class failed" but only on alternate executions

    Hi folks, can anyone tell me why this works every alternate time it's run? Run it and it works fine. Run it again "Paste method of Worksheet class failed" Run it again it works fine. Run it again "Paste method of Worksheet class failed" etc..... Thanks. Sub CopyRows() Dim RowNum As Integer Dim...
  17. K

    Find last row value from multiple sheets and copy those values to another sheet

    ok got this far and the masg box shows last row values but having trouble on figuring out how to put those values in Sh5 column O , so it finds the last row in sheets 1 -4 , just want to paste the last row value into 4 cells starting at O1= lastrow hS1, O2=lastrow Sh2,O3= lastrow Sh3 and O4=...
  18. P

    Archive data error in code

    Hi Good morning, I hope you can help me I have a command button once clicked on it should archive the old data that has 'delivered' in a cell. But I get an error 'Run time error 9 - subscript out of range' on the line below, please also see the whole code below, hope you can help. lastrow =...
  19. P

    Problem with duplicates

    Hi All I'm using the code below to create template copies, how can i adapt it to avoid duplicates please and only create unique worksheets. Sub NewDays() Dim i As Long, LastRow As Long, wksht As Worksheet Sheets("Tides").Activate LastRow = Cells(Rows.Count, 1).End(xlUp).Row For i = 1...
  20. E

    Selection Change Macro Error when Autofilter Hides Row

    I have a selection change macro in a file that updates only when the selection occurs in the "NIIN" column of values. The macro works fine unless you apply a filter (from the preapplied AutoFilter) that hides the row that is currently being graphed and even if I select a now visible cell it...

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