Share via

Sorting in Excel to get a correct mailing list.

Mary Daly 0 Reputation points
2026-03-17T14:30:20.0133333+00:00

I am trying to sort a file in Excel that was created in my EMR. I need to do a mailing for each patient. The cell sizes are not the same. Is there a way to do sort this?

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

2 answers

Sort by: Most helpful
  1. Hendrix-C 15,825 Reputation points Microsoft External Staff Moderator
    2026-03-17T17:35:53.3+00:00

    Hi @Mary Daly,

    Thank you for posting your question in the Microsoft Q&A forum. 

    For further assistance, could you provide more detailed information about this situation? I appreciate your understanding and cooperation. 

    • When you say the "cell sizes are not the same", does that mean the row heights/column widths are different, some cells are merged or anything else?
    • Is each patient’s information contained on one row, or does one patient’s data span multiple rows?
    • What exactly happens when you try to sort? (get an error message, sort complete but the data becomes misaligned, etc.)
    • Are you sorting the entire data range, or just one column?

    For the best assistance, please share a screenshot of the worksheet and also your expected outcome if possible so I can clearly understand the situation to provide the most appropriate guidance for your concern.

    Please understand that my initial response may not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution. 

    Thank you for your understanding and cooperation. I look forward to hearing from you.

    Was this answer helpful?


  2. Q&A Assist
    2026-03-17T14:30:35.8433333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Excel can sort the data correctly for a mailing list even if the visible cell sizes (row heights/column widths) are different. Sorting works on the underlying rows and columns, not on cell size.

    To sort the mailing list reliably:

    1. Make sure the data is in a proper rectangular range with one row per patient and one column per field (e.g., Name, Address, City, etc.), and that each column has a header.
    2. Click any cell inside the data range.
    3. On the Data tab, in the Sort & Filter group, select Sort.
    4. In the Sort dialog:
      • Under Column, choose the column to sort by (for example, Last Name or ZIP Code).
      • Under Sort On, leave Cell Values.
      • Under Order, choose A to Z / Z to A (for text) or Smallest to Largest / Largest to Smallest (for numbers or ZIP codes).
    5. If needed, select Add Level to sort by more than one column (for example, first by ZIP Code, then by Last Name).
    6. Select OK.

    Important points for EMR‑exported data:

    • Ensure the entire patient list is included in the sort. Do not select just one column; instead, select any single cell in the list and let Excel expand the selection automatically, or manually select the full range.
    • If some fields (like ZIP codes or IDs) are stored as text and others as numbers in the same column, standardize them first; mixed types can sort unexpectedly. Use Ctrl+1Number tab to set the column to Text or Number consistently.
    • If the EMR export added leading spaces (common in system exports), remove them (for example, with the TRIM function) before sorting, so names and addresses sort correctly.

    Different row heights or column widths do not prevent sorting; Excel will keep each patient’s row together as long as the entire range is sorted as one block.


    References:

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.