Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Add cell value from cell above when cell is empty

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
find first empty cell in column and start transpose next row in that cell ali Excel Discussion (Misc queries) 6 July 21st 07 11:55 PM
format a cell with a formula so an empty reference cell shows blan M2 Excel Discussion (Misc queries) 3 November 7th 06 10:42 PM
Conditional formatting - on an empty cell condition in _another_ cell? StargateFan[_3_] Excel Programming 5 May 29th 06 08:56 PM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? Steven Rosenberg Excel Programming 0 August 5th 03 06:10 AM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? SROSENYC Excel Programming 1 August 5th 03 04:34 AM


All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"