2017-05-25 53 views
-3

讓我來解釋一下這個奇怪的主題。複製外部excel文件中的所有數據以獲取特定ID

我有這樣一個表:

<table> 
 
    <tr> 
 
    <th>ID</th> 
 
    <th>Country</th> 
 
    <th>City</th> 
 
    <th>Code</th> 
 
    </tr> 
 
    <tr> 
 
    <td>AA_1</td> 
 
    <td>Germany</td> 
 
    <td>Berlin</td> 
 
    <td>1234</td> 
 
    </tr> 
 
    <tr> 
 
    <td>BB_2</td> 
 
    <td>Poland</td> 
 
    <td>Woclaw</td> 
 
    <td>2345</td> 
 
    </tr> 
 
</table>

而另一位像

<table> 
 
     <tr> 
 
     <th>ID</th> 
 
     <th>Country</th> 
 
     <th>City</th> 
 
     <th>Code</th> 
 
     </tr> 
 
    </table>

我創建片段用於顯示我的SH eet

現在有什麼問題。如果我的文件A.xlsx被填充並且B.xlsxis只與頭一起被清空,我想要執行如下操作: 如果在我的B文件中,我將填充ID Columnt,例如:AA_1我希望自動完成剩餘列(全部來自A文件)。

我該如何實現它?

+0

自動完成其中的column A輸入數據,它會自動填充? Excel或HTML? –

+0

excel不是html。 – Defus

回答

0

工作表Sheet1:

enter image description here

Sheet2中:

enter image description here

選擇單元格B2, C2 and D2Sheet2,然後按Ctrl + Shift + down arrow。然後輸入公式欄下面的公式,然後按Ctrl + enter

=IFERROR(INDEX(Sheet1!B:B,MATCH($A2,Sheet1!$A:$A,0),1),"") 

現在只要您在sheet2

相關問題