Extraer datos de 2 libros externos y totalizar en hoja activa

juanpy

New Member
Joined
Aug 21, 2014
Messages
17
Estimados,

Estoy complicado con un tema vba, por lo que espero vuesto profesional consejo.

Necesito comparar la informacion de 2 libros externos diferentes.

En c:\Cuentas, se encentra el libro; CUENTAS.XLSX (en la hoja1 estan los codigos).
En z:\Movimientos, se encuentra el libro; MOV.XLSX (en la hoja estas los movimientos).

Mi libro activo es; c:\users\mis docuimentos; hoja totales

Tengo que:
Code:
Abrir Cuentas
Activar Cuentas
For z=1 to FilaFinalDeCuentas
   Leer Cuenta.sheet1.A1
   Abrir Movimientos
   Activar Movimientos
   For y=1 to FilaFinalDeMovimientos
       Si Cuentas.CodigoDeCuenta=Movimientos.CodigoDeModvimientos
           Activar Paso
           Buscar.Cuentas.CodigoDeCuenta
           si existe
                 celda(fila,columna+3)=celda(fila,columna+3)+Movimiento.celda(y,3)
           sino
                celda(fila,columna+3)=Movimiento.celda(y,3)
           fin si
      fin si
    proximo Movimientos
proximo Cuentas

Bueno, gracias por cualquier comentario o aporte al respecto.
 
Last edited:

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,214,808
Messages
6,121,684
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top