我有这段代码:
=ImportXML("http://www.site.co.uk/content?q=test", "//div[@id='searchCount']")
在数据中它返回:
Items 1 to 10 of 1,819
如何更改公式以剥离"项目X到X的"所以我只留下最后的号码吗?
答案 0 :(得分:1)
试试这个
=INDEX(SPLIT(ImportXML("http://www.site.co.uk/content?q=test", "//div[@id='searchCount']")," "),1,COLUMNS(SPLIT(ImportXML("http://www.site.co.uk/content?q=test", "//div[@id='searchCount']")," ")))
答案 1 :(得分:0)
或者,这可能也有效:
=REGEXEXTRACT(ImportXML("http://www.site.co.uk/content?q=test", "//div[@id='searchCount']"), "of (.+)$")+0