Google Sheets · import steps and formulas
Export Instagram comments to Google Sheets
Download the comments as an Excel file, upload it to Google Sheets, and every comment and reply is a row you can count, filter and share with your team. Free for posts with up to 1,000 comments.
Import it without breaking the IDs
- Download the Excel (XLSX) file from the export page.
- Open a Google Sheet, choose File, Import, Upload and drop the file in.
- Pick Insert new sheet(s) (or Replace spreadsheet for a fresh file) and press Import data.
Why XLSX and not CSV: comment_id and user_id are long numbers, and Sheets keeps only about 15 significant digits of a number. In the XLSX file they are text, so they arrive intact. If you import the CSV, untick Convert text to numbers, dates, and formulas to protect the IDs (likes will then be text too; wrap them in VALUE() when you sum).
The columns, A to L: #, comment_id, username, user_id, comment, posted_at_utc, likes, is_reply, reply_to_comment_id, reply_to_username, mentions, hashtags. The formulas below assume that layout on a sheet named Comments.
Who commented: UNIQUE and COUNTUNIQUE
A list of everyone who commented, once each, on a new sheet in cell A2:
=UNIQUE(FILTER(Comments!C2:C, Comments!C2:C<>""))
How many people that is: =COUNTUNIQUE(Comments!C2:C)
Only people who left a top-level comment (not just replies): =UNIQUE(FILTER(Comments!C2:C, Comments!H2:H="no"))
Mentions: COUNTIF on the mentions column
How many comments tag your account: =COUNTIF(Comments!K2:K, "*@yourbrand*"). The asterisks match the handle anywhere in the cell.
How many @ tags a comment has. In Comments!M2:
=ARRAYFORMULA(IF(Comments!K2:K="", 0, LEN(Comments!K2:K)-LEN(SUBSTITUTE(Comments!K2:K, "@", ""))))
That fills the whole column. Then =COUNTIF(Comments!M2:M, ">=2") is the number of comments that tag two or more people, which is the usual giveaway rule.
Most-tagged accounts:
=QUERY(FLATTEN(ARRAYFORMULA(IFERROR(SPLIT(Comments!K2:K, " ")))), "select Col1, count(Col1) where Col1 <> '' group by Col1 order by count(Col1) desc label count(Col1) 'times'", 0)
Comments per person and per day: QUERY
Comments per person, most active first:
=QUERY(Comments!A1:L, "select C, count(B) where C is not null group by C order by count(B) desc label count(B) 'comments'", 1)
Comments per day. The timestamp is text in YYYY-MM-DD HH:MM:SS, so take its first ten characters as the day:
=QUERY({ARRAYFORMULA(LEFT(Comments!F2:F, 10)), Comments!B2:B}, "select Col1, count(Col2) where Col1 <> '' group by Col1 order by Col1 label count(Col2) 'comments'", 0)
Select the result and choose Insert, Chart for a line chart of the conversation over time. If you prefer clicking to typing, Insert, Pivot table with username in Rows and comment_id in Values set to COUNTA gives the same per-person table.
Check the sheet holds every comment
=COUNTA(Comments!B2:B) is the number of rows. Compare it with comments read on the export page: they are the same number. The export page also shows the count Instagram reports; that one can be slightly higher because Instagram counts comments it hides from everyone. The guide on why the two counts differ explains the gap.
Questions
Can comments go straight into Sheets without a download?
Not yet. Download the XLSX and use File, Import, Upload; it takes a few seconds and keeps the IDs intact.
Why do my comment IDs end in zeros?
The CSV was imported with number conversion on, and Sheets rounded the long IDs. Re-import the XLSX file, where the IDs are text.
Does UNIQUE treat Priya and priya as different people?
Instagram usernames are lowercase, so the username column is already consistent. Use user_id if you need an identity that survives a username change.
Is the timestamp my local time?
No, it is UTC. Add a column with =DATEVALUE(LEFT(F2, 10)) + TIMEVALUE(MID(F2, 12, 8)) - TIME(5, 0, 0) for UTC minus 5, and format it as date time.