View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PaulSinki[_7_] PaulSinki[_7_] is offline
external usenet poster
 
Posts: 1
Default Help?? Averaging cells

Okay, I'm stumped here.
I want to be able to write a macro that will go down a list of cells,
and if the offset(0,-1) is blank, then will execute code. That part
I've written. But what I need it to do is fill any blank cells to the
left with the average of the first cell and the next cell with data.
Ie Row 365 has a value of 9 in column E. There are blank cells in
column D & C, and in column B there is a value of 3. I want the macro
to work out the average of 3 and 9, and put the answer, 6, in cells
C365 & D365. The number of gaps between cells will vary, so I was
wanting to use a xlToLeft, but how can I get it to work out the
averages of the two cells with values in them?
Thanks
Paul


---
Message posted from http://www.ExcelForum.com/