View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
inigo45 inigo45 is offline
external usenet poster
 
Posts: 1
Default CountBlank in calculation

Hallo,
Newbie in VBA:

I want to run a macro for a calculation in either the one way a) or th
other way b) as follows:

macro a)

description: I select a range (e.g. A5:A55, this is always different
could be A345:A432). The first value is FinishDay, the last value i
StartDay, the cells between are all blank and should be counted.

What I did (with no result) is:

Function BKN(StartDay As Integer, FinishDay As Integer, CountBlank A
Range)
BKN = (FinishDay - StartDay) / (Countblank - 1)
End Function

What is the right way?

macro b)
I would prefer that, but is probably not that easy. Just select a rang
and let the macro look for the FIRST and LAST value and do the same a
above.

Cheers
Juerge

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