在长的可变文本字符串中提取文本
Extract Text Within a Long Varying String of Text
我遇到的问题是这个。我提取的数据以一种非常不方便的方式添加了信息。当我试图分离和提取字符串中的特定文本时,它变得非常复杂。我希望能够提取 "Ships in 1-2 business days" 一些字符串列为 "Ships 1-2 weeks" 如果适用,也需要提取这些字符串。
单元格中的字符串是:
[{"orderItemId":609507407,"lineItemKey":"1509870501993","sku":"SKU-111111","name":"Company
Product - NA / Ships in 1-2 business
days","imageUrl":"https://FAKEADDRESS.com/","weight":{"value":352.0,"units":"ounces","WeightUnits":1},"quantity":1,"unitPrice":1599.0,"taxAmount":null,"shippingAmount":null,"warehouseLocation":null,"options":[],"productId":30236912,"fulfillmentSku":null,"adjustment":false,"upc":"","createDate":"2018-11-03T20:20:42.247","modifyDate":"2018-11-03T20:20:42.247"}]
使用 =RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1) 我可以找到我需要的东西,但是之后的一切仍然存在。请参阅下面的示例。
Ships in 1-2 business
days","imageUrl":"https://FAKEADDRESS.com/","weight":{"value":352.0,"units":"ounces","WeightUnits":1},"quantity":1,"unitPrice":1599.0,"taxAmount":null,"shippingAmount":null,"warehouseLocation":null,"options":[],"productId":30236912,"fulfillmentSku":null,"adjustment":false,"upc":"","createDate":"2018-11-03T20:20:42.247","modifyDate":"2018-11-03T20:20:42.247"}]
本质上,我只是想让公式提取文本 "Ships in 1-2 business days" 如果不是 1-2 天送货方式,一些字符串将包含 "Ships in 1-2 weeks",我想也提取。
这是您需要的公式。这是您已有内容的变体。
=LEFT(B12,FIND(CHAR(34),B12)-1)
当然,B12就是你发表的公式。因此,通过将 "B12" 替换为您的公式,您将获得所需的结果。
=LEFT(RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1),FIND(CHAR(34),RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1))-1)
我遇到的问题是这个。我提取的数据以一种非常不方便的方式添加了信息。当我试图分离和提取字符串中的特定文本时,它变得非常复杂。我希望能够提取 "Ships in 1-2 business days" 一些字符串列为 "Ships 1-2 weeks" 如果适用,也需要提取这些字符串。
单元格中的字符串是:
[{"orderItemId":609507407,"lineItemKey":"1509870501993","sku":"SKU-111111","name":"Company Product - NA / Ships in 1-2 business days","imageUrl":"https://FAKEADDRESS.com/","weight":{"value":352.0,"units":"ounces","WeightUnits":1},"quantity":1,"unitPrice":1599.0,"taxAmount":null,"shippingAmount":null,"warehouseLocation":null,"options":[],"productId":30236912,"fulfillmentSku":null,"adjustment":false,"upc":"","createDate":"2018-11-03T20:20:42.247","modifyDate":"2018-11-03T20:20:42.247"}]
使用 =RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1) 我可以找到我需要的东西,但是之后的一切仍然存在。请参阅下面的示例。
Ships in 1-2 business days","imageUrl":"https://FAKEADDRESS.com/","weight":{"value":352.0,"units":"ounces","WeightUnits":1},"quantity":1,"unitPrice":1599.0,"taxAmount":null,"shippingAmount":null,"warehouseLocation":null,"options":[],"productId":30236912,"fulfillmentSku":null,"adjustment":false,"upc":"","createDate":"2018-11-03T20:20:42.247","modifyDate":"2018-11-03T20:20:42.247"}]
本质上,我只是想让公式提取文本 "Ships in 1-2 business days" 如果不是 1-2 天送货方式,一些字符串将包含 "Ships in 1-2 weeks",我想也提取。
这是您需要的公式。这是您已有内容的变体。
=LEFT(B12,FIND(CHAR(34),B12)-1)
当然,B12就是你发表的公式。因此,通过将 "B12" 替换为您的公式,您将获得所需的结果。
=LEFT(RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1),FIND(CHAR(34),RIGHT(C5,LEN(C5)-FIND("Ships",C5,1)+1))-1)