View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Maria[_7_] Maria[_7_] is offline
external usenet poster
 
Posts: 25
Default Find empty cells

Hello!

I'd like to find an empty cell within a range and then
check if the following cells are empty too. The following
command creates a trendline if a cell is empty. But this
is not enough; all following cells within the range "b" &
vol1 need to be empty as well ... (the if/ else is just
used if the value is the first entry in the range).
I hope you understand what I mean ... Can anybody help?
Thank you!
Maria

If IsNumeric(.Range("b" & .Range("vol1").SpecialCells
(xlCellTypeBlanks).Cells(1).Row - 2).Value) Then trendlin
(1) = .Range("b" & .Range("vol1").SpecialCells
(xlCellTypeBlanks).Cells(1).Row - 1).Value - .Range("b"
& .Range("vol1").SpecialCells(xlCellTypeBlanks).Cell s
(1).Row - 2).Value Else trendlin(1) = .Range("b" & .Range
("vol1").SpecialCells(xlCellTypeBlanks).Cells(1).R ow -
1).Value