• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hashtag seperator

Naren264

New Member
Hi,
I have post description as a column which contains mix of captions, hashtags, punctuations and special characters.
For example: " this is my new post on nature #naturephotography #nature_love . . . .What do you think? ....... #greenery #traveller #photography_passion."

I want to get each hashtag in each new separate column.
I have tried the twitter hashtag separator formula from the previous post here. But when there is some unwanted data after hashtag as in after #nature_love it also gives "What do you think?" along with the hashtag in the same column. I don't want that. I only want hashtags and should ignore all the words, sentences and special characters in the middle.

It will be very helpful if someone can help me with this. Thanks in advance.
 
Try in B1 (copy across)
Code:
=IFERROR("#"&TRIM(LEFT(SUBSTITUTE(MID(SUBSTITUTE($A1,"."," "),FIND("|",SUBSTITUTE(SUBSTITUTE($A1,"."," "),"#","|",COLUMNS($B:B)))+1,LEN($A1))," ",REPT(" ",LEN($A1))),LEN($A1))),"")
 
Hi,

Office 365:

=TRANSPOSE(FILTERXML("<a><b>"&SUBSTITUTE(A1," ","</b><b>")&"</b></a>","//b[contains(., '#')]"))

Else, Excel 2013 and later:

=INDEX(FILTERXML("<a><b>"&SUBSTITUTE($A1," ","</b><b>")&"</b></a>","//b[contains(., '#')]"),COLUMNS($A1:A1))

and copied to the right.

Regards
 
Back
Top