WebMar 4, 2014 · May 18, 2010. #1. Hi, I have a data set where I want to establish the last Row using Column A. For this, I would normally use: Code: LR = Range ("A" & Rows.Count).End (xlUp).Row. However, the data set I am working on contains formula blanks ("") after the last "real" value, and this method is taking these Rows into account which I don't want. Web1 Answer. Function GetLastValueInColumn (sCOL As String) GetLastValueInColumn = Parent.Cells (Rows.Count, sCOL).End (xlUp).Value End Function. The call to Parent should resolve to the worksheet that the function is called from. This function's behaviour could be expanded to address another worksheet or the ActiveSheet if it was required to be ...
excel - Value of last non empty cell - Stack Overflow
WebApr 26, 2024 · Dim loTable As ListObject Dim lngRowLast1 As Long Dim lngRowLast2 As Long 'Set reference to your specific table Set loTable = ThisWorkbook.Sheets (1).ListObjects ("Table1") With loTable 'I use the following as a catch in case the table is empty If .DataBodyRange Is Nothing Then .ListRows.Add lngRowLast1 = 1 … WebApr 11, 2016 · To get the Last Cell in a series of data (table with non-blank values) we need to use the End property of an Excel VBA Range. Dim lastCell as Range 'Get Last Cell in a series of data Dim lastCell as Range Set lastCell = Range("A1").End(xlRight).End(xlDown) Debug.Print "Row: " & lastCell.row & ", Column: " … ethylene feedstock prices
Excel VBA: Find the Next Empty Cell in Range (4 …
WebMost Robust Formula to Get Value of Last Non-Empty Cell This works even if there are empty rows in the data set; however, it can be a bit confusing. Select All =LOOKUP (2,1/ (C1:C50<>""),C1:C50) This formula gets the value of the last non-empty cell from column C within the range of C1 to C50. C1:C50 is the range in which your data set will appear. WebOct 22, 2024 · The formula your are looking for is: =LOOKUP (2,1/ (A2:F2<>""),A2:F2) Apply it to the range you want to extract the last non blank cell in your row. I enter the formula in cell G2. Share Improve this answer Follow answered Oct 21, 2024 at 20:11 Wizhi 6,348 4 24 46 Add a comment 1 In you would like to use vba, you can use the below code. WebOct 22, 2024 · The formula your are looking for is: =LOOKUP (2,1/ (A2:F2<>""),A2:F2) Apply it to the range you want to extract the last non blank cell in your row. I enter the formula … ethylene ethephon