# Thread: Add totale and trasfering in other sheet.... (2000 sr 1)

1. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

You could use the AdvancedFilter method to copy the unique values from column C on the T3574 sheet to the TOTALI sheet, then loop through the items and add the totals.
Or you could sort T3574 on column C, loop through the items and copy an item to TOTALI each time the value changes.
You have received several examples of similar code in the past.

2. ## Add totale and trasfering in other sheet.... (2000 sr 1)

Messaggio cancellato da sal21

3. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

Try this formula in G3:

=SUMPRODUCT((T3574_VARIUOS_MONTH!\$A\$3:\$A\$9999=TOTA LI!\$A3)*(T3574_VARIUOS_MONTH!\$C\$3:\$C\$9999=TOTALI!\$ C3)*(T3574_VARIUOS_MONTH!G\$3:G\$9999))

and fill right and down as far as needed. (SUMPRODUCT = MATR.SOMMA.PRODOTTO)

4. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

... remember
I have maked tese macro, but it work very,very slow, peraphs is my PC?
Please test for me, and after tell me.
Tks for patience.

http://www.mytempdir.com/515625

5. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

The formulas involve a very large number of calculations. Perhaps the macro will run faster if you add this line at the beginning of the macro:

Application.Calculation = xlCalculateManual

and this one at the end:

Application.Calculation = xlCalculateAutomatic

6. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

error 1004...

7. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

Oops, the example in the VBA help for Excel 2002 is incorrect. It should be xlCalculationManual instead of xlCalculateManual, and xlCalculationAutomatic instead of xlCalculateAutomatic.

same time...

9. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

What do you mean?

10. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

..."but it work very,very slow" from my last post.
Assuming i have the code in this spost 563,042, not i spossible to caculate the Gtotale into sheet TOTALE during the import of txt file?... in this mode not is possible to save time?

11. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

Why don't you try it? <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

12. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

ok, i make a code. But your comment to insert Gtotal directly from text import?

13. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

Yes, that should be possible. You'd have to keep track of the total during the import, as I suggested in my first reply in this thread.

14. ## Re: Add totale and trasfering in other sheet.... (2000 sr 1)

HI Hans....
Hi hvae saloved with a macro (in modulo2) and formula:
=SOMMA.SE('T3574'!\$C\$3:\$C\$9999;\$C3;'T3574'!G\$3:G\$9 999)

but now have a prob....
The sheet T3574 is refred only with a month in column A , and if i have a shett similar T3574_variuios_month, how to intercepr the blok for variuos CBxxxxxxx and the refered month?

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•