Split a Google Sheet into separate tabs by category
A spreadsheet with one new tab per category, original data left intact
Open my spreadsheet [sheet link or file name] and split it into separate tabs by [split rule, e.g. one tab per value in the City column, or only rows where Stage is Closed]. Leave the original tab untouched. For each group, create a new tab named after the value, copy the header row, then copy every matching row with [all columns, or only these columns, e.g. name, email, amount]. Keep the original row order and formatting. Put rows with a blank or unclear value in an Unsorted tab instead of guessing. If the split would create more than [max tabs, e.g. 20] tabs, or a tab with the same name already exists, stop and ask me first. When done, check that the row counts across the new tabs add up to the source, or to the matching rows for a filter. Give me a short table with columns: tab name, row count, notes, plus any rows I should review.