Home > Software engineering >  Two EXCEL file, how to achieve a row or column to realize automatic synchronization
Two EXCEL file, how to achieve a row or column to realize automatic synchronization

Time:10-13

How two EXCEL file, a row or column to open a file automatically synchronize another a column of the EXCEL, please help to illustrate the specific implementation way!

CodePudding user response:

Book1 book2 and open at the same time, in the sheet1 book1 a1=input, and then select the sheet1 book2 a1
And then drag the book1 a1 to a10, save, later in the book2 should automatically update the contents of the book1 a10 a1 ~...

Give it a try...

CodePudding user response:

Is data link, but it's not recommended this usage. Because it is hard to guarantee is built in the excel file, update problem.

CodePudding user response:

 
Private Sub Workbook_Open ()
FLNM=ThisWorkbook. Path & amp; "\ book1. XLS"
If Dir (FLNM) & lt;> "" Then
With GetObject (FLNM)
R=. Sheets (1). UsedRange. Rows. Count
C=. Sheets (1). UsedRange. Columns. The Count
CRR=. Sheets (1). UsedRange
The Close (False)
End With
Range (" a1 "). The Resize (r, c)=CRR
End the If
End Sub
  •  Tags:  
  • VBA
  • Related