Macro excel para generar Subtotales por Producto y por tipo producto

Se tiene un archivo llamado x.xlsx en hoja1:

                         A                                   E                                 G                            I                   K

                 Producto                 Tipo Producto                  Dato2                   Dato3           Dato4

2                     20                               50                                   60                          10                 20
3                     10                              10                                   10                           30                 40
4                     20                              10                                   10                           50                 60
5                     10                                5                                     5                            50                 20
6                      20                              50                                  10                           10                  20

7 ........... Hasta el último registro en A

Se requiere macro que totalice en la hoja "resumen" en el mismo archivo x.xlsx quedando así:                                               A                         E                                           G                         I                       K

                  Producto          Tipo Producto                       Total2                      Total3               Total4 ......

                     20                                 50
                                                          50                                   60                            10                     20

                                                          50                                   10                            10                      20

Subtotal       20                               50                                    2 Registros

                      20                                10

                                                           10                                 10                             5 0                     60

Subtotal      20                                 10                                   1 Registros

      Así sucesivamente hasta el último registro en A

GRAN TOTAL                                                                         3  Registros (en el ejemplo)

Añade tu respuesta

Haz clic para o