Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

DynamicSum with counters??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
zymo - 22 Jan 2007 16:26 GMT
I'm really want to find out how to put this metacode in Excell

' CounterDay represents the columnnr where the calculation has to
happen. Starts on row 31 untill row 365
' CounterV is the counter to count the number of V's he finds (it
stops counting when CounterN has reached 30
' CounterN Is Increased by 1 when the cell A(DAY-1-CounterV) is equal
to the Value "V"

CounterDay = 31

  IF A(CounterDay-1-CounterV) = V
     Then CounterV = CounterV+1
     Else CounterN = CounterN+1
  End If CounterN = 30

Sum=B(CounterDay-1):B(CounterDay-CounterN)
Put Sum in Cell C CounterDay
CounterDay + 1

End If CounterDay=365
Bob Phillips - 22 Jan 2007 17:41 GMT
For i = 31 To 365
       If Cells(i,"A").Value = "V" then
           CounterN = CounterN + 1
           If CounterN = 30 Then
               Exit For
           End If
       End If
   Next i

Signature

---
HTH

Bob

(change the xxxx to gmail if mailing direct)

> I'm really want to find out how to put this metacode in Excell
>
[quoted text clipped - 17 lines]
>
> End If CounterDay=365
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.