Solved, sorry for posting![]()
Solved, sorry for posting![]()
Last edited by michaelkwc; 05-24-2008 at 03:15 AM.
michaelkwc,
If you solve the problem you should post the answer. Also please read forum rules below and post to the correct forum next time. I have moved to functions
Here's my suggestion
This sums odd rows
This sums even rows=SUMPRODUCT(MOD(ROW(B1:B99),2)*B1:B99)
combine the two to get the difference=SUMPRODUCT((1-MOD(ROW(B1:B99),2))*B1:B99)
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
If your data is in B2:B201 then this should return what you want.
=SUMPRODUCT( MOD(ROW(B2:B201)-ROW(B2),2)*B2:B201 - MOD(ROW(B3:B202)-ROW(B2),2)*B2:B201 )
_
...How to Cross-post politely...
..Wrap code by selecting the code and clicking the # or read this. Thank you.
sorry, did not realise that this problem belonged in Functions... did not even realise there was such a subforum too because i wrongly assumed that Programming included everything. my bad.
my problem was that i didn't realise my original demo data was inadequate; it was odd in number (e.g. 5 cells), and thus when i take EVEN-ODD, it returned an error since well a blank cell can't minus a cell with data. Added another line of data and it worked fine.
still, thanks for the functions, it definitely helps much better than my
again, sorry, and thank you.![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks