首页 > 解决方案 > vlookup函数excel剪切字符串的一部分

问题描述

伙计们,我有一个小问题。我有 2 个 csv 文件,我想将一些数据从一个 csv 复制到另一个 id 相同的数据。为此,我使用 vlookupfunction,但有些东西不好。原始 csv 中的原始字符串是:

48 Port Managed Layer 3 Gigabit Ethernet Switch with optional 10GigE uplink and 802.3af and Legacy Power over Ethernet. Includes 48 - Copper Gigabit (1000Base-T) access ports and 2 - High Speed Expansion Slots. Provides up to 370 watts of 802.3af compliant power. Features include 802.1Q VLANs, GVRP, 802.1p QoS, 802.1w Rapid Spanning Tree, 802.3ad Link Aggregation, Auto MDI/MDI-X, CLI, HTTP GUI, SSH, SSL, RADIUS, SNMP. 19" Rackmount 1U housing. Includes AC PoE power supply. Supported expansion modules: Dual Stacking XIM (4700470F1, 4700470F2, 4700470F5), Dual SFP XIM (1700473F1), Dual SFP+ XIM (1700471F1).

当我使用这个功能

=IFERROR(VLOOKUP($A2,osnova.csv!$B$2:$AD$1660,8,0),IF(G2="","",G2))

我得到这个字符串:

48 Port Managed Layer 3 Gigabit Ethernet Switch with optional 10GigE uplink and 802.3af and Legacy Power over Ethernet. Includes 48 - Copper Gigabit (1000Base-T) access ports and 2 - High Speed Expansion Slots. Provides up to 370 watts of 802.3af compliant power. Features include 802.1Q VLANs, GVRP, 802.1p QoS, 802.1w Rapid Spanning Tree, 802. 19" Rackmount 1U housing. Includes AC PoE power supply. Supported expansion modules: Dual Stacking XIM (4700470F1, 4700470F2, 4700470F5), Dual SFP XIM (1700473F1), Dual SFP+ XIM (1700471F1).

不同之处在于我在原始字符串中有这部分,而在复制的版本中我丢失了那部分:

.3ad Link Aggregation, Auto MDI/MDI-X, CLI, HTTP GUI, SSH, SSL, RADIUS, SNMP.

有人可以帮我弄这个吗?我的功能做错了吗?

标签: excelvlookup

解决方案


您的 Excel版本必须达到VLOOKUP. 你不应该首先使用这个功能,它坏了而且很烂。考虑使用更高级的 INDEX/MATCH组合=index(osnova.csv!$H$1660, match($A2,osnova.csv!$B$2,0))


推荐阅读