Help Needed: Write an Excel Macro

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

mine75

Thread Starter
Joined
Oct 10, 2008
Messages
1
Hi, all excel expert! I need help in writing a macro to do a sum in excel (which has 1milion lines of data).
I am trying to do a cumsum column where it will cum previous roll value in the Value column if the Object_Type matches to it’s previous, IF not it will print the value at Value colume. See the table below at row 8, where the cumsum value is the Value in column B, bc of mismate of A(8) to A(7). Anyone knows how to write this? See example below. Thanks.

=IF(A2=A1,SUM(B2,C1),B2) è formula in excel (I can’t do this with 2million lines of data in excel)

I know how to do it for hundreds line data, but the dataset that's 1million lines.. :(
Please help...

ColA ColB ColC
ObjectType Value CumSum
A 1 1
A 2 3
A 2 5
A 1 6
A 0 6
A 5 11
Z 3 3
Z 2 5
Z 0 5
Z 1 6
Z 4 10
Q 2 2
Q 0 2
Q 0 2
W 1 1
W 1 2
W 3 5
W 4 9
 

HCD

Joined
Oct 29, 2007
Messages
495
Not sure on limitations within macros - but have you tried running "cumulative" macros. Take selection of macros to "cumsum" say 100,000 lines and then run a final macro to take all of the 100,000 calculations. Presumably the numbers are all fixed, whole numbers with no decimal places....?
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top