Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need an efficient way to find the cell below the last
number in a column in a macro. Thanks -- Occasionally stumped |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() (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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to find the last number of a column (lower cell) | Excel Discussion (Misc queries) | |||
FInd common data in one column then add number in adjacent column | Excel Worksheet Functions | |||
Find previous number and find next number in column | Excel Discussion (Misc queries) | |||
How to find what number in Column A is not included in Column B? | Excel Discussion (Misc queries) | |||
Find DMIN in a column range determined by a number in another cell | Excel Worksheet Functions |