View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default Lookup/count blank cells problem

Take a look at your original post!
--
Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Tom Watt" wrote in message
ps.com...
The problem is specifying the cells each month. One month values may
exist in C5 and C12, the next month they may be in C4 and C13. I would
like to create one set of formulas, lock them and they work..

Thanks,

Tom

JLatham wrote:
You should be able to specify a range with the COUNTBLANK function.

in D12, try this formula:

=(C12-C5)/COUNTBLANK(C5:C12)

"Tom Watt" wrote:

Hello,

I have used the LOOKUP formula to find the value of the the next cell
up with data (because there are blank lines seperating them), and this
works. But now I need to divide the difference of two values by the
number of blank lines that seperates them plus 1 (the number of days
that the two values are apart). COUNTBLANK will not work because it
will return the amount of blank cells total in a column, not just ones
that are seperating two values (which are not always in the same
cells).

Example:

This month there happens to be a value 101,010 in C5 and later a value
102,020 in C12. In D12 I would like the difference (102,020-101,010)
divided by the number of cells apart (C12-C5=7).

Thanks,

Tom