EXCEL table more than one combination
For example, sheet1 in:
names of the departments wage
Zhou Lun 2870 the Office of the Personnel Section 2750 Xiaoxuan
Zheng
Supply Section 2680 of
sheet2 in:
names of the departments wage
Tugang 2980 sales Liu
Section 2900 Purchasing
now sheet3 to achieve the results of this:
names of the departments wage
Zhou Lun 2870 the Office of the Personnel Section 2750 Xiaoxuan
Zheng
of 2680 Supply Section
Tugang 2980 sales Liu
Section 2900 Purchasing
if the tables I and II of the data, three tables of data automatically update
please know that the solution of a favor ! ! !
I only had 10 minutes to send the whole prawns were more! !
I just passed a similar problem:/ question/74495168.html
source table is replaced by a two
Table 1 Table 2 Table 3 completion of the update will automatically update the background has led to the table with an update operation, a waste of resources, the proposed event on Table 3 below activated, the effect is the same.
Code
home In Table 3
Private Sub Worksheet_Activate ()
Range ( “A:Z”).Clear 'empty part of the region, including to the general
Dim SubRowIndex As Integer
Dim SubRowIndex3 As Integer
Dim SubColIndex As Integer
SubRowIndex = 2 'from Table 1 in the second line to start
Do
For SubColIndex = 1 To 10 'from the first column of Table 1 year, a total of 10
Worksheets ( “Sheet3”).Cells (SubRowIndex3, SubColIndex) = Worksheets ( “Sheet1”).Cells (SubRowIndex, SubColIndex).Value' hands-Fu Value statement
Next SubColIndex
SubRowIndex = SubRowIndex + 1
SubRowIndex3 = SubRowIndex3 + 1
Loop While Worksheets ( “Sheet1”).Cells (SubRowIndex, 1) “”
Worksheets ( “Sheet3”).Cells (SubRowIndex3, SubColIndex) = Worksheets ( “Sheet2”).Cells (SubRowIndex, SubColIndex).Value 'hands-on assignment
Next SubColIndex
SubRowIndex = SubRowIndex + 1
SubRowIndex3 = SubRowIndex3 + 1
Loop While Worksheets ( “Sheet2”).Cells (SubRowIndex, 1) “” 'Table 2 as the first space-time out of
End Sub
debugging does not, however, should not be a problem when more
reference:
/ question/69684815.html
added
defined in the statement after Fu added SubRowIndex3 initial statement, such as
Dim SubRowIndex3 As Integer
SubRowIndex3 = 2
Leave a Reply
You must be logged in to post a comment.