Home |
Search |
Today's Posts |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave. I had to modify it to fit my needs, but you gave me the concept
I needed. -- Jim T "Dave Peterson" wrote: Option Explicit Sub testme() Dim FirstEmpty As Range Dim StartCell As Range With ActiveSheet Set StartCell = .Range("A3") If IsEmpty(StartCell.Value) Then Set FirstEmpty = StartCell ElseIf IsEmpty(StartCell.Offset(0, 1).Value) Then Set FirstEmpty = StartCell.Offset(0, 1) Else Set FirstEmpty = StartCell.End(xlToRight).Offset(0, 1) End If End With MsgBox StartCell.Address(0, 0) & vbLf & FirstEmpty.Address(0, 0) End Sub Jim Tibbetts wrote: Cell A3 has data in it. How do I go to the first empty cell to the right so I can paste data? I have this code and it works if there is data in cell B3, but doesn't work if B3 is blank. Range("A3").End(xlToRight).Offset(0, 1).Select Thanks for any help, -- Jim T -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find the first blank row in a cell | Excel Discussion (Misc queries) | |||
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... | Excel Programming | |||
Find First Non blank cell than find column header and return that value | Excel Worksheet Functions | |||
Find first blank cell | Excel Programming | |||
Find and blank cell then Do this..... | Excel Programming |