excel - 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.
有人可以帮我弄这个吗?我的功能做错了吗?
解决方案
您的 Excel版本必须达到VLOOKUP
. 你不应该首先使用这个功能,它坏了而且很烂。考虑使用更高级的 INDEX/MATCH组合=index(osnova.csv!$H$1660, match($A2,osnova.csv!$B$2,0))
。
推荐阅读
- django - 部署我的 Django 应用程序时如何修复 heroku 连接错误
- python - SQLAlchemy 在使用 contains_eager 时加载不相关的缓存对象
- javascript - 如何在 Wordpress 页面上呈现 React?
- sql - 在 SQL 中使用“Pivot”将行转换为列
- ios - Swiftui 如何在 foreach 循环中对整行使用 Tap Gesture
- c# - 为什么这个迭代是在一个列表上
没有从 SQL 视图中给我正确的值? - sql - 我正在尝试将三个表与一个持有外键的表一起使用
- r - 用另一个不同长度的数据集的行重命名这些行
- python - 在注册表单上使用 Jinja/SQL 作为下拉菜单
- kubernetes - Prometheus servicemonitor 间隔被忽略