View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default CountBlank in calculation

Juergen,

Are you ready for this?

=(INDIRECT(CHAR(COLUMN($B$1)+64)&MAX(ROW(1:100)*(N OT(ISBLANK(B1:B100)))))-IN
DIRECT("B"&MIN(IF(NOT(ISBLANK(B1:B100)),ROW(B1:B10 0)))))/(INDEX(A1:A100,MATC
H(INDIRECT(CHAR(COLUMN($B$1)+64)&MAX(ROW(1:100)*(N OT(ISBLANK(B1:B100))))),B1
:B100,0),1)-INDEX(A1:A100,MATCH(INDIRECT("B"&MIN(IF(NOT(ISBLAN K(B1:B100)),RO
W(B1:B100)))),B1:B100,0),1)+1)

array formula, so commit with Ctrl-Shift-Enter

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"inigo45 " wrote in message
...
Bob Phillips Thanks for your reply.
I work with a worksheet with four columns A (for date), B (for day), C
(for night), D (for gas). My entries are not every day so these entries
vary. Example:
5th Feb. 2003 25888 22222 22,88888
6th Feb. 2003
7th Feb. 2003
.
12th Feb. 2003 25989 23333 33,55555.

Now what the macro should do:
1. input StartDay (here 25888),
2. input FinishDay (here 25989),
3. count the cells between StartDay and FinishDay (here seven).

He (25989 - 25888) / (7 +1) = _12,625_.

this is BKN=(FinishDay - StartDay)/(????? +1)

????? is the numerical value of the counted cells, which is the
question? How do I involve this in my function resp. in the
calculation?
Any ideas
Cheers Juergen


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