How to clean Instagram comments in a spreadsheet
Raw comments are full of @tags, emoji, line breaks and "😍😍😍". Before you count words or sort feedback into themes, a few formulas turn them into text a spreadsheet can work with.
Updated Nov 17, 2026 · 6 min read
Work on a copy of the text
Never overwrite the comment column (E). Add a column clean and build it up from E, so you can always check a cleaned comment against what the person actually wrote.
Google Sheets: REGEXREPLACE does most of it
Remove @mentions, then anything that is not a letter, digit, space or basic punctuation (which takes the emoji with it), then squeeze the spaces:
=TRIM(LOWER(REGEXREPLACE(REGEXREPLACE(E2, "@[A-Za-z0-9._]+", ""), "[^\p{L}\p{N}\s\?\!\.,']", "")))
\p{L} keeps letters in every alphabet, so Spanish, Portuguese and Arabic comments survive. To keep hashtag words but drop the #, add REGEXREPLACE(..., "#", "") around it.
Excel: SUBSTITUTE and TRIM
Excel 365 has REGEXREPLACE too in current versions; if yours does not, these cover the common cases:
- Line breaks to spaces:
=SUBSTITUTE(E2, CHAR(10), " ") - Extra spaces: wrap in
TRIM() - Lower case: wrap in
LOWER() - Mentions: the export already lists them in
mentions(column K), so for counting you can ignore them in the text; to remove them, Find and Replace with wildcards cannot do it reliably, so use Power Query's Split Column by Delimiter on spaces and drop parts starting with @.
Flag what you are looking for
| Flag | Formula (works in both) |
|---|---|
| Question | =ISNUMBER(SEARCH("?", E2)) |
| Mentions a price | =OR(ISNUMBER(SEARCH("price", E2)), ISNUMBER(SEARCH("cost", E2)), ISNUMBER(SEARCH("how much", E2))) |
| Emoji only | =AND(LEN(E2)>0, M2="") where M is the cleaned column |
| Long comment | =LEN(E2)>=120 |
Count each flag with =COUNTIF(N:N, TRUE). "Emoji only" comments are reactions, not feedback: worth counting, not worth reading one by one.
Most common words (Google Sheets)
=QUERY(FLATTEN(ARRAYFORMULA(IFERROR(SPLIT(M2:M, " ")))), "select Col1, count(Col1) where Col1 <> '' group by Col1 order by count(Col1) desc limit 50 label count(Col1) 'times'", 0)
The top of the list will be "the", "and", "to". Put those in a short stop-word list on another sheet and add and not Col1 matches 'the|and|to|a|of|is' to the query. What is left is what people talked about.
FAQ
Will cleaning lose information?
Only in the clean column. Keep the original comment next to it and you can always go back.
Can I keep emoji but drop mentions?
Yes: use only the inner REGEXREPLACE that removes @mentions, then TRIM.