lastrow

  1. F

    Fill Uneven Records Across Columns

    Hi All, Could you please help me find a way to fill in the blank cells that should start from the LastRow + 1 in Col B and go until LastRow in Col C? At the moment the data is just being pasted over the lastrow in Col B. Loop in question is the last one, rest is just used to show more or less...
  2. R

    Finding Last Row/Column to Hide other Cells

    Hello, I am trying to finding the last row with a value. -I know how to do this typically by using "xlUp" but for some reason it is stopping at a cell that does not contain a value but just a change in color. -I am now trying to find a different way to go about this. Instead, I want to...
  3. E

    Formatting to last row

    I want to highlight cell b37 and until the last row (which might change) in order to format that range of data this is what i have so far, whereby i have declared at the very start of the code the following: Dim Lastrow as Long originally i had it as range("B37:B150").Select, but i had to...
  4. R

    Finding the last row that contains a value, of a column

    Hello, I am trying to select a cell in the last row that does not contain a 0. It is taking me to Row 54 but I want it to go to Row 37. The method I know is to go to a cell at the bottom of the sheet and "xlUp" so it will find the first value it finds. I want to do this but want to ignore all of...
  5. 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...
  6. D

    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...
  7. 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...
  8. 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...
  9. 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...
  10. 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 =...
  11. 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...
  12. 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...
  13. 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>...
  14. 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...
  15. 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...
  16. 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...
  17. 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 =...
  18. 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...
  19. 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...
  20. 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...

Some videos you may like

This Week's Hot Topics

Top