This website uses Cookies. Click Accept to agree to our website's cookie use as described in our Privacy Policy. Click Preferences to customize your cookie settings.

Showing results for

- Airtable Community
- Discussions
- Ask A Question
- Formulas
- Alphabetical Sorting within a Cell

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Topic Labels:
Formulas

0
10340
4

Showing results for

Comment Post Options

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Oct 03, 2023 06:39 PM

Is there a way to sort the contents of a cell alphabetically?

If I create a cell that is gathering data from other sources (linked file, concatenated), can I then take that data and arrange it alphabetically? I'm struggling to find anything that works with the data in a single cell.

Thank you for any tips you might have!

4 Replies 4

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Oct 03, 2023 09:03 PM

By other source, do you mean a table in another Base using Sync, or another table in the same Base?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Oct 03, 2023 09:36 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Oct 03, 2023 09:36 PM

Hmm... Airtable doesn't seem to like those functions. I appreciate it though!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Oct 04, 2023 12:12 AM

If you have data within a single cell in a spreadsheet program like Microsoft Excel or Google Sheets, and you want to sort the contents of that cell alphabetically, you would typically need to use a combination of functions or methods to achieve this. Here's a general approach:

Excel:

Text to Columns (Optional):

If your data in a cell is separated by commas or another delimiter, you can use Excel's "Text to Columns" feature to split the data into separate cells in the same row. This can make it easier to sort.

Sort Function:

In a nearby cell, you can use the SORT function to sort the values from your original cell alphabetically.

For example, if your original data is in cell A1, you can use a formula like =SORT(SPLIT(A1, ",")) to alphabetically sort the comma-separated values.

Array Formula (Alternative):

If you want to perform this sorting within a single cell, you can use an array formula.

Select a cell where you want the sorted result to appear (let's say B1).

Enter the following formula as an array formula (Press Ctrl + Shift + Enter instead of just Enter after typing the formula):

=TEXTJOIN(",",TRUE,SORT(FILTERXML("<t><s>" & SUBSTITUTE(A1,",","</s><s>") & "</s></t>","//s")))

This formula assumes your data is comma-separated.

Google Sheets:

Text to Columns (Optional):

Similar to Excel, you can use the "Split text to columns" feature in Google Sheets to separate data if it's delimited.

Sort Function:

In a nearby cell, you can use the SORT function to sort the values from your original cell alphabetically.

For example, if your original data is in cell A1, you can use a formula like =SORT(SPLIT(A1, ",")) to alphabetically sort the comma-separated values.

Array Formula (Alternative):

You can use a similar array formula as described for Excel in Google Sheets to sort within a single cell.

Remember that these methods are based on the assumption that the data within the cell is either separated by a delimiter (e.g., commas) or structured in a way that allows for splitting. If your data is more complex or doesn't follow a consistent pattern, additional data preparation steps may be needed before sorting.

Reply