Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save hardik-vala/afdf323d09a025fd5797536e6497cbcb to your computer and use it in GitHub Desktop.
Save hardik-vala/afdf323d09a025fd5797536e6497cbcb to your computer and use it in GitHub Desktop.

Using only Sheets

  1. Copied the text from https://www.sfchronicle.com/newsroom_contacts/ to an empty Google spreadsheet.
  2. Split the names by comma using the "Split text to columns" feature, recorded in a macro so I can apply it using a keyboard shortcut.
  3. Used this formula to format as rows, =CONCATENATE("03/26/2023,Hardik,",B44,",",A44,",",A46,",,,San Francisco Chronicle,",A45)
  4. Then copied it over to another sheet, splitting the text into columns.
  5. Sorted the columns to move the interspersed empty rows.

Using ChatGPT

Prompt:

Format these examples.

Name: Buchmann, Anna
Title: Engagement Editor
Email: anna.buchmann@sfchronicle.com
Output: 3/26/2023,Hardik,Anna,Buchmann,anna.buchmann@sfchronicle.com,,,San Francisco Chronicle,Engagement Editor

Name: Bulwa, Demian
Title: Director of News
Email: demian.bulwa@sfchronicle.com
Output: 3/26/2023,Hardik,Demian,Bulwa,demian.bulwa@sfchronicle.com,,,San Francisco Chronicle,Director of News

Name: Cabanatuan, Michael
Title: Reporter
Email: mcabanatuan@sfchronicle.com
Output: 

Response:

3/26/2023,Hardik,Michael,Cabanatuan, [mcabanatuan@sfchronicle.com](mailto:mcabanatuan@sfchronicle.com) ,,,San Francisco Chronicle,Reporter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment