last row

  1. A

    Get number of row in Range

    Hello, I am trying to write a Sub in which I need the number of rows in a Range which is input as a parameter of the Sub. I can't find the syntax to get the number of rows in the range. For other functions where the range is already known (in this case Range("A:A")) when writing, I've been...
  2. E

    Copy and Paste - Use next line from same source

    hello everyone, Fairly new to VBA. I'm only using simple macros. Just wanting some help with a VBA. I want to copy and paste items from the same cell which I change, into the next line after. Here's what I use so far. But I don't know how to loop it so it does the next line down. I hope that...
  3. B

    Last row in Dynamic Range

    I am attempting to retrieve the value found in the last cell/row in column E of a dynamic range. The first row containing data will always be E12 and the last row fluctuates on a daily basis. The formula I am using invariably returns the value found in E12 only - so I am obviously doing...
  4. E

    Prevent deletion of last row of excel table

    Hi folks I have an Excel Table with names and abbreviations of names (two columns only). I would like to prevent users from deleting the header row and last row in the table. <tbody> Abbreviation Surname and Initial PM Masters, P JL Leonard, J JM Matsau, J TOTAL 3 [given by...
  5. A

    Find Last Row in Excel

    I have a workbook that launches a userform that gets updated. I need to take all the values in the userform and input that into a different excel file (workbook). It cannot overwrite the data, but enter all new submissions in the last empty row. Any help would be greatly appreciated.
  6. Johnny Thunder

    VBA Help - Modify a LastRow Lookup line of code - Excel 2016

    Hello All, I have a piece of code that I need to modify since it works so well, it essentially is a Last Row Lookup (Column Based) and defines the last row with an actual formula result. What I need: I have a variable to replace the column letter "ColumnL" that I need to update the line of...
  7. T

    Find the last row and highlight it yellow

    Hi, any help on this is greatly appreciated! I'm trying to find the last row with data and highlight it yellow. I started with finding the last row but don't know the rest :) Help! Sub HighlightLastRow() Dim LastRow As Long With Sheets("Sheet1") LastRow = .Cells(.Rows.Count...
  8. L

    Rows.Count Error

    Hi Folks, I am trying to get data from multiple workbooks into 1workbook, building up a large data source. The code should open each workbook selected, copy cellsA3:AP and last row and then paste into the new workbook at the last blank row. I am currently struggling with finding the last row to...
  9. D

    Copy and Paste Loop between two sheets

    Thanks in advance for the help. The calculation sheet has several API keys that determine distances between multiple start points compared to one end point. The data dump sheet list all my end points that I want to know the optimum distance. Instead of manually going line by line, I would like...
  10. W

    How to define last row from a given starting point

    I'm trying to set print area based on how many rows in a range are not blank. I have tried the offset function to dynamically set a range, but Excel keeps converting the dynamic range to a static range. I'd like to have a button to press that says "print" and will set the proper print area in...
  11. M

    VBA Update table

    Hi Gurus, Looking for your help to fix my code below, what I am trying to do is to update my table vertically, instead of horizontally. Just to clarify, I was updating my data like this: <tbody> A B C D E F G 1 2018-30 2018-31 2018-32 2018-33 2018-34 2018-35 2 Open 27 26 25 27 28 30 3...
  12. R

    Sort Variable Number of Rows Alphabetically -Copy Formula to Last Row -Last Row Issues

    Hi Everyone, In a formatting step of a larger macro, I am trying to select a variable number of rows beginning with cell C9:J, and then sort alphabetically. Below is what I have written, but it doesn't seem to be working so far (no errors given though). Dim LRowC As Long LRowC =...
  13. S

    Absolute value of lastRow

    I have this Formula in my VBA: "=IF(COUNTIF(ProblemAnalysis!R2C[" & Count & "]:R[" & lastRowProb & "]C[" & Count & "],RC[" & Count & "]=0,""No"",""Yes"")" And have set these: Count = (Range(rngAddress1, rngAddress50).Columns.Count - 1) * -1 lastRowProb =...
  14. L

    How do I sum a range with last rows

    I am not sure how to do this on VBA, I want to sum a range that will start on P7, and also where will it show me the answer? Sub suma() Dim rng As Range Dim answer As Long LastRows = Sheets("Draft").Range("P" & Rows.Count).End(xlUp).Row Set rng = AD.Worksheets("Draft").Range("P7" &...
  15. L

    Copy Paste On The Following Row VBA

    Hi, I have this Macro where it select a range and paste it on a specific cell, is there a way it can do it on the following of the last row. Sub CopiaDetalle() Dim rng As Range Ultimafila = Range("C" & Rows.Count).End(xlUp).Row With Sheets("U-Detail") Set rng = Range("C11:AC" &...
  16. L

    Copy Paste Last Row VBA

    Hi I have this macro where it selects a range tehn copy and paste it on another sheet, but I would like to do it on the last row, is that possible? Sub CopiaDetalle() Ultimafila = Worksheets("U-Detail").Range("C" & Rows.Count).End(xlUp).Row UltimafilaD = Worksheets("Detail").Range("C" &...
  17. J

    Paste selected range of cells in other worksheets first free cell

    Hello, I know there are few similar threads and I've tried a few advised codes, but it still doesn't work at all. I've also tried to change them a bit to match my purpose but I failed (call me dummy, but I've spend the whole weekend working on this thing and my brain fails me). What I need is a...
  18. L

    Copy Paste Last Row VBA

    Hi, i have this macro, but i would like it to paste after the last row, what should I change? ' Fecha Rw = Range("AA" & Rows.Count).End(xlUp).Row With Sheets("Draft") For Each Cl In .Range("J7", .Range("J" & Rows.Count).End(xlUp)) If Cl.Value = "Active" Then...
  19. T

    Addition of "2nd footer" for each page?

    Hey all, Not sure how to really ask this question, but here goes: I have a spreadsheet I'm working on that I need to add some sort of additional footer for each page to be placed above the existing built-in footer and span across the entire width of the page. I suppose it could be a text-box...
  20. R

    Use VBA to make reference to last row of data

    I have a sheet "System Data" with a few thousand rows of data across dozens of columns. I have another sheet ""Stats" with 40 Sumproduct (SP) formulas, each parsing multiple points of data. The SP formula can take 20 minutes to render, which is painful to sit through. I suspect SP looks...

Watch MrExcel Video

This Week's Hot Topics

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
Top