Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Importhtml Query Extract Between String

I’m trying to find a formula that fits two tables

=QUERY(IMPORTHTML(A1,"table", 16), "Select Col4")

output is
Page 1/10Page 2/10Page 3/10Page 4/10Page 5/10Page 6/10Page 7/10Page 8/10Page
9/10Page 10/10
Another:

=QUERY(IMPORTHTML(A2,"table", 16), "Select Col4")

output is
Page 1/3Page 2/3Page 3/3

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I want to extract the digits between "space" and "/" Is there a way to do this in this formula itself?

I then tried this

=transpose(SPLIT(REGEXREPLACE(A2,"Page|/10","~"),"~",0,1))

This also doesn’t work since I have to manually change /10 to /3 in the second formula

Is there any way to achieve this for both data?

The sheet is here

>Solution :

try:

=ARRAYFORMULA(IF(ROW(A1:B)<=(1*{
 REGEXEXTRACT(IMPORTXML(A1, "//option[@value='21']"), "\d+$"), 
 REGEXEXTRACT(IMPORTXML(B1, "//option[@value='21']"), "\d+$")}), 
 ROW(A1:B), ))

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading