Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Very nice Mike, very nice.
-- Gary''s Student - gsnu200908 "Mike H" wrote: Includes a trap for no empty cells Dim rng As Range On Error GoTo Getmeout Set rng = Range("K2:V2") rng.Cells.SpecialCells(xlCellTypeBlanks).Cells(1). Select Exit Sub Getmeout: MsgBox "No empty cells in range" Mike "Mike H" wrote: Hi, Try this but note I didn't trap for no empty cells in the range which would throw an error Dim rng As Range Set rng = Range("K2:V2") rng.Cells.SpecialCells(xlCellTypeBlanks).Cells(1). Select Mike "Hal" wrote: I have the range K2:V2. I want to start at K2 and check if the cell is empty. If so select it, if not, check L2, M2 . . . V2 until the first empty cell in this range is found, and then select it. The code below will work but I would like to have something more professional. Signed, Novice at work If Range("K2").Value = "" Then Range("K2").Select Elseif Range("L2").Value = "" Then Range("L2").Select . . . Else Range("V2").Select |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to select range from active cell range name string | Excel Programming | |||
HELP W/ VBA: SELECT RANGE, ALLCAPS, CELL COLOR, RETURN TO BLANK CELL/PATTERN CELL | Excel Programming | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
Select Cell Range | Excel Programming | |||
select last cell in used range | Excel Programming |