问题描述
我有3张名为'sheet1','sheet2'和'mapping'表。
'Sheet1'包含实际数据(可以说原始数据和列号/标题名称可以不同)
'Sheet2'包含主表格列(Sheet1数据标题应按照表格2)
'映射'包括sheet1和sheet2之间的映射
I have 3 sheets named 'sheet1', 'sheet2' and 'mapping' sheet.
'Sheet1' consist the actual data (Can say raw data and column numbers/header name can be different)
'Sheet2' Consist the master sheet columns (Sheet1 data header should be as per the sheet2)
'mapping' consist the mapping between sheet1 and sheet2
| AB| AF| AL| | C1| C2| C3| |sheet1 column_name | Sheet2 column_name|
|-----------| |-----------| | AB | C1 |
| 1 | f | y | | | | | | AL | C2 |
|---------- | |---------- | | AF | C3 |
| 2 | g | Q | | | | | -----------------------------------------
|---------- | |---------- |
| 6 | i | e | | | | |
------------- -------------
"Sheet 1" "Sheet 2" "Mapping"
我正在寻找可以根据映射表更新sheet1列的代码。就像映射表说AB=C1那样,sheet1列应该更新为C1
我用匹配函数尝试了但是没有成功任何其他的想法?
提前谢谢。
I am looking for code which can update sheet1 columns as per the mapping sheet. Like if mapping sheet says "AB" = "C1" then sheet1 column should be updated as "C1"
I have tried it using matchfunction but didn't get success.any other idea?
Thanks in advance.
推荐答案
这篇关于如何根据映射的工作表更改列名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!