philfer
01-30-2008, 12:29 PM
Hello,
I have a worksheet as follows :-
Currency Amount Code GBP equiv
GBP 5000 11896 5000
USD 4000 11896 2000
EUR 1400 11896 1000
SEK 2000 12895 1000
GBP 1000 12895 1000
USD 2000 12895 1000
etc etc
I end up with
Currency Amount Code GBP equiv Code Total GBP equiv
GBP 5000 11896 5000 11896 8000
USD 4000 11896 2000
EUR 1400 11896 1000
SEK 2000 12895 1000 12895 3000
GBP 1000 12895 1000
USD 2000 12895 1000
In VBA I get put a formula in the second code column :-
=IF(C2=C1,0,C2)
and in the Total GBP equiv column :-
=SUMIF(C:C,E1,D:D)
both using the R1C1 notation
However SUMIF's tend to make a file really big and slow.
Can anyone think of a way in VBA to get the same results but without using SUMIFs
Thanks
I have a worksheet as follows :-
Currency Amount Code GBP equiv
GBP 5000 11896 5000
USD 4000 11896 2000
EUR 1400 11896 1000
SEK 2000 12895 1000
GBP 1000 12895 1000
USD 2000 12895 1000
etc etc
I end up with
Currency Amount Code GBP equiv Code Total GBP equiv
GBP 5000 11896 5000 11896 8000
USD 4000 11896 2000
EUR 1400 11896 1000
SEK 2000 12895 1000 12895 3000
GBP 1000 12895 1000
USD 2000 12895 1000
In VBA I get put a formula in the second code column :-
=IF(C2=C1,0,C2)
and in the Total GBP equiv column :-
=SUMIF(C:C,E1,D:D)
both using the R1C1 notation
However SUMIF's tend to make a file really big and slow.
Can anyone think of a way in VBA to get the same results but without using SUMIFs
Thanks