View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 6,953
Default Add cell value from cell above when cell is empty

Sub FillCells()
Dim rng as Range, ar as Range, cell as Range
Set rng = columns(1).SpecialCells(xlBlanks)
for each ar in rng
for each cell in ar
if cell.row = 3 then
if cell.offset(0,6) < "===============" then
cell.Resize(1,6).Filldown
end if
end if
next
Next
end Sub

Obviously, test this on a copy of your data.

--
Regards,
Tom Ogilvy


"sverre" wrote:

Hi

here is my case:

IF CELL value is empty in the area from cells (3,1) to cells (defined
below,6) then I want excel to add the cell value from cell above. This should
continue to and excluding when cells (x,7) has the value "==============="

Is it possible to solve?

Sverre