Sub SumProduct(RowCount1 As Long, RowStart As Long, ColumnCount As Long) Dim ColumnStart As Long, ResultColumn Dim x As Long, y As Long Dim SumProduct As Double, TempTotalSum As Double
'Initialize ColumnStart equal to M' ColumnStart = 13 'Initialize ResultColumn to column C' ResultColumn = 3 For x = ColumnStart To ColumnCount Step 2 'Initialize SumProduct and TempTotalSum to 0.00' SumProduct = 0.00 TemTotalSum = 0.00 For y = RowStart To RowCount1 If Cells(y, ResultColumn).Value = "Result" Then 'Write to Result Row' If TempTotalSum = 0.00 Then 'Checks for Divisor = 0' Cells(y, x).Value = 0.00 Else: Cells(y, x).Value = SumProduct / TempTotalSum 'fix for the total sum' Cells(y, x+1).value = TempTotalSum End If 'Reset SumProduct and tempTotalSum' SumProduct = 0.00 TempTotalSum = 0.00 Else SumProduct = SumProduct + Cells(y, x).Value * Cells(y, x + 1).Value TempTotalSum = TempTotalSum + Cells(y, x + 1).Value End If Next y Next x End Sub On Tue, Feb 11, 2014 at 4:30 PM, <bangpypers-requ...@python.org> wrote: > Send BangPypers mailing list submissions to > bangpypers@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/bangpypers > or, via email, send a message with subject or body 'help' to > bangpypers-requ...@python.org > > You can reach the person managing the list at > bangpypers-ow...@python.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BangPypers digest..." > > > Today's Topics: > > 1. { Parsing } (Shashidhar Paragonda) > 2. Re: { Parsing } (Vaikuntham Jagannath) > 3. Re: { Parsing } (Shashidhar Paragonda) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 11 Feb 2014 11:56:21 +0530 > From: Shashidhar Paragonda <shashidha...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: [BangPypers] { Parsing } > Message-ID: > <CAL2NvRxytb0UDqEQXWCcU4hEf7BB8Ht= > tzmlvvkeud9rjx8...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hello Python hackers > > >>> I wanted to write parser for below GHERKIN format, can anyone suggest > best pythonic approach to parse and extract the details from below eg: > > >>> My need is to discard the common english words and extract rest of the > text and write entries to XML ( i thought of using XML, please suggest any > other format storage ). > > Feature: Password management Scenario: Forgot password Given a > user with email "cu...@cukes.info" exists When I ask for a password > reset Then an email with a password reset link should be sent > > >>> NOTE: Feature, Scenario, Given, When , Then are like keywords in above > text > > > ----------------------------------- > Regards, > > Shashidhar N.Paragonda > shashidha...@gmail.com > +919900093835 > > > ------------------------------ > > Message: 2 > Date: Tue, 11 Feb 2014 15:59:53 +0800 > From: Vaikuntham Jagannath <vjagannat...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] { Parsing } > Message-ID: > < > caj6c5wge_8qg+fkolvpccwaqrm2bgbjqcornf12vzlvzmky...@mail.gmail.com> > Content-Type: text/plain; charset=UTF-8 > > Hi, > > Why do you want to write a parser for the Gherkin format ? If we can know > the underlying need, then may be We can suggest you more effectively. > > Regards, > Jagan > > On Tue, Feb 11, 2014 at 2:26 PM, Shashidhar Paragonda < > shashidha...@gmail.com> wrote: > > > Hello Python hackers > > > > >>> I wanted to write parser for below GHERKIN format, can anyone suggest > > best pythonic approach to parse and extract the details from below eg: > > > > >>> My need is to discard the common english words and extract rest of > the > > text and write entries to XML ( i thought of using XML, please suggest > any > > other format storage ). > > > > Feature: Password management Scenario: Forgot password Given a > > user with email "cu...@cukes.info" exists When I ask for a password > > reset Then an email with a password reset link should be sent > > > > >>> NOTE: Feature, Scenario, Given, When , Then are like keywords in > above > > text > > > > > > ----------------------------------- > > Regards, > > > > Shashidhar N.Paragonda > > shashidha...@gmail.com > > +919900093835 > > _______________________________________________ > > BangPypers mailing list > > BangPypers@python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Message: 3 > Date: Tue, 11 Feb 2014 14:47:51 +0530 > From: Shashidhar Paragonda <shashidha...@gmail.com> > To: Bangalore Python Users Group - India <bangpypers@python.org> > Subject: Re: [BangPypers] { Parsing } > Message-ID: > < > cal2nvrx7wdzq6+max1wducf27z0zjzupodn7aa_8cprc-7v...@mail.gmail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Hi > >>> The main requirement is to build autamation script parsing the Gherkin > format. > >>> We planned to use Gherkin format to basically convert the test > use-cases. > >>> Everyone who does manual / automation test, will use Gherkin format to > generate the test use-cases, so that Gherkin becomes a common format > platform to build test cases. > > > > ----------------------------------- > Regards, > > Shashidhar N.Paragonda > shashidha...@gmail.com > +919900093835 > > > On Tue, Feb 11, 2014 at 1:29 PM, Vaikuntham Jagannath < > vjagannat...@gmail.com> wrote: > > > Hi, > > > > Why do you want to write a parser for the Gherkin format ? If we can know > > the underlying need, then may be We can suggest you more effectively. > > > > Regards, > > Jagan > > > > On Tue, Feb 11, 2014 at 2:26 PM, Shashidhar Paragonda < > > shashidha...@gmail.com> wrote: > > > > > Hello Python hackers > > > > > > >>> I wanted to write parser for below GHERKIN format, can anyone > suggest > > > best pythonic approach to parse and extract the details from below eg: > > > > > > >>> My need is to discard the common english words and extract rest of > > the > > > text and write entries to XML ( i thought of using XML, please suggest > > any > > > other format storage ). > > > > > > Feature: Password management Scenario: Forgot password Given a > > > user with email "cu...@cukes.info" exists When I ask for a password > > > reset Then an email with a password reset link should be sent > > > > > > >>> NOTE: Feature, Scenario, Given, When , Then are like keywords in > > above > > > text > > > > > > > > > ----------------------------------- > > > Regards, > > > > > > Shashidhar N.Paragonda > > > shashidha...@gmail.com > > > +919900093835 > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers@python.org > > > https://mail.python.org/mailman/listinfo/bangpypers > > > > > _______________________________________________ > > BangPypers mailing list > > BangPypers@python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > https://mail.python.org/mailman/listinfo/bangpypers > > > ------------------------------ > > End of BangPypers Digest, Vol 78, Issue 2 > ***************************************** > -- *sahil* chug _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers