0
votes

I am new to google spreadsheets & want to copy class names mentioned in range c10 in to b3. I am trying to use following formula which I know is wrong:

=query(C3:C52, "copy class name where C contains 'class' in cell c10 ")

C10 cell contains following data:

<body bgcolor="beige" class="body"> <div class="big_wrapper">

I want following two words to appear in cell b3:

body big_wrapper

Please correct above formula.

For more clarity visit sheet1 of following link:

https://docs.google.com/spreadsheets/d/1HfgOqprc-P34vOI-nGAionllrGAOsMOVuLB5ozboWBY/edit#gid=0

1
Looking at your posting patterns, seems like you are much more interested in getting your work done instead of learning how to do it, not a right approach.Vasim
Actually I am trying to make a system which will include jquery, html and css, I am taking help of spreadsheets to keep the class codes & jquery functions, it is difficult to describe but it will help in my project and so far I have learnt what I got, but frankly telling I really know very less about google spreadsheet data functions, so please help in solving above questionuser3811050
Try using the =search function instead of =queryBjorn Behrendt

1 Answers

1
votes

There may be easier ways, but try (in B3):

=join(" ", regexextract(C10, "class="&char(34)&"(.+?)"&char(34)&">.+class="&char(34)&"(.+?)"&char(34)&">"))