ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find cell below last number in a column (https://www.excelbanter.com/excel-programming/360726-find-cell-below-last-number-column.html)

Two-Canucks

Find cell below last number in a column
 
I need an efficient way to find the cell below the last
number in a column in a macro.
Thanks
--
Occasionally stumped

Two-Canucks

Find cell below last number in a column
 
Sorry, found the efficient way in one of the answers.
--
Occasionally stumped


"Two-Canucks" wrote:

I need an efficient way to find the cell below the last
number in a column in a macro.
Thanks
--
Occasionally stumped


Sandy

Find cell below last number in a column
 
what was the method?

Thanks

"Two-Canucks" wrote:

Sorry, found the efficient way in one of the answers.
--
Occasionally stumped


"Two-Canucks" wrote:

I need an efficient way to find the cell below the last
number in a column in a macro.
Thanks
--
Occasionally stumped


broro183[_91_]

Find cell below last number in a column
 

(edit: Ooopps! I see you have an answer, anyway...)

here's one option which checks that the spreadsheet is not full:

Sub LastRowPlusOne()
Dim FirstBlank As Long
If IsEmpty(Range("A" & Rows.Count)) Then
FirstBlank = Cells(Rows.Count, "a").End(xlUp).Offset(1, 0).Row
Else
MsgBox "Column A is full"
End If
End Sub

hth
Rob Brockett
NZ
always learning & the best way to learn is to experience..

--
broro18
-----------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...fo&userid=3006
View this thread: http://www.excelforum.com/showthread.php?threadid=53943


Ken Hudson

Find cell below last number in a column
 
If you have text and numbers in column A and are looking for the cell below
the last cell containing a number, you could use:

Option Explicit
Dim Rows As Double
Dim Iloop As Double
Sub LastNoPlusOne()
Rows = Range("A65536").End(xlUp).Row
For Iloop = Rows To 1 Step -1
If IsNumeric(Cells(Iloop, "A")) Then
MsgBox ("The location is row " & Iloop + 1 & ".")
Exit For
End If
Next Iloop
If Iloop = 0 Then
MsgBox ("No numbers found.")
End If
End Sub

if you are only looking for the row below the last entry (text or number) in
column A, change the "IsNumeric" to "Not IsEmpty" in the code.

--
Ken Hudson


"Sandy" wrote:

what was the method?

Thanks

"Two-Canucks" wrote:

Sorry, found the efficient way in one of the answers.
--
Occasionally stumped


"Two-Canucks" wrote:

I need an efficient way to find the cell below the last
number in a column in a macro.
Thanks
--
Occasionally stumped


Two-Canucks

Find cell below last number in a column
 
A bit late but here goes:
Range("C7").Select
ActiveCell.End(xlDown).Offset(1, 0).Select 'FINDS LAST NUMBER IN
COLUMN C
--
Occasionally stumped


"Sandy" wrote:

what was the method?

Thanks

"Two-Canucks" wrote:

Sorry, found the efficient way in one of the answers.
--
Occasionally stumped


"Two-Canucks" wrote:

I need an efficient way to find the cell below the last
number in a column in a macro.
Thanks
--
Occasionally stumped



All times are GMT +1. The time now is 02:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com