Excel Error Codes

How to Fix Excel SORTBY #NAME? Error on iPhone

Maira MehtabMaira Mehtab Nov 13, 2026 868 views

Question details

The user needs to understand why a SORTBY formula that works on Excel for Mac returns a #NAME? error when the workbook is opened on an iPhone or in another spreadsheet application, and how to restore normal calculation.

How to Fix Excel SORTBY #NAME? Error on iPhone
Product
Microsoft Excel / WPS Office Spreadsheets
Device & OS
iPhone (iOS), Mac (macOS)
Scenario
The user created a workbook with a SORTBY formula on a Mac and now needs to open the same workbook on an iPhone or in another spreadsheet application without errors.
Observed behavior
The same formula returns #NAME? on the iPhone and shows Google Sheets conversion syntax such as ARRAYFORMULA and _xlws.
Before you start

Before troubleshooting, confirm which app is opening the file on the iPhone. If the formula contains ARRAYFORMULA or _xlws, the workbook is likely being viewed or converted through Google Sheets, not the native Excel or WPS Office app.

Solution 1Recommended

Reopen the Workbook in the Native Excel or WPS Office App

Use this when the #NAME? error appears in an app that shows ARRAYFORMULA or _xlws, because those markers indicate Google Sheets conversion rather than a problem with the SORTBY formula itself.

SORTBY is an Excel dynamic array function and may not be valid when a workbook is converted into Google Sheets. Opening the original .xlsx file directly in Excel or WPS Office avoids the conversion syntax that causes #NAME?.

1
Open the file in the Excel or WPS Office app

On your iPhone, download the original .xlsx file, then open Excel or WPS Office and tap Open > Files to browse to the workbook. If the file preview opens in Google Sheets, tap Share and choose Excel or WPS Office instead.

2
Inspect the formula for Google Sheets conversion syntax

Select the cell that shows #NAME?, tap the formula bar, and check for ARRAYFORMULA or _xlws in front of the formula.

3
Save the workbook in .xlsx format

After the formula calculates, tap File > Save or the Save icon, keep the Excel Workbook (.xlsx) format, and reopen the file to confirm the error is gone.

Reopen the Workbook in the Native Excel or WPS Office App
Expected result: SORTBY should calculate normally when the workbook is opened in an app that supports the function and the file remains in .xlsx format.
Direct solution

Use WPS Office on iPhone to Open SORTBY Workbooks Without Conversion Errors

Open the .xlsx workbook directly in WPS Office on iPhone so the SORTBY formula stays in its native Excel form, avoiding Google Sheets conversion syntax and restoring compatibility.

  1. 1. Install WPS Office on iPhone: Open the App Store, search for WPS Office, and download the free app.
  2. 2. Open the workbook from Files or cloud storage: In WPS Office, tap Open, browse to the .xlsx file, and open it directly without Google Sheets.
  3. 3. Check the SORTBY formula: Tap the cell that previously displayed #NAME?, open the formula bar, and verify the formula starts with =SORTBY without ARRAYFORMULA or _xlws.
  4. 4. Save the file as .xlsx: If you make changes, tap Save and keep the Excel Workbook (.xlsx) format so the file remains compatible with Excel.
Preserves Excel SORTBY formulas without Google Sheets ARRAYFORMULA conversion syntax.Supports .xlsx format for seamless compatibility with Microsoft Excel.Free mobile spreadsheet app for iPhone with a familiar interface.Lightweight and easy to use for viewing and editing workbooks on the go.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Excel SORTBY formula show #NAME? only on iPhone?

Usually the file is being opened through Google Sheets, which adds conversion functions like ARRAYFORMULA and _xlws. Open the original .xlsx file directly in Excel or WPS Office instead.

How can I tell if Google Sheets is causing the SORTBY #NAME? error?

Tap the formula cell and look for ARRAYFORMULA or _xlws in the formula bar. These markers indicate the workbook was converted or viewed in Google Sheets, where SORTBY is not supported in the same way.

Can WPS Office open an Excel SORTBY workbook on iPhone?

Yes. Open the .xlsx file directly in WPS Office and check that the formula remains =SORTBY without conversion syntax.

What should I do if SORTBY still shows #NAME? in the native Excel app?

Update Excel or WPS Office to a version that supports dynamic array functions, then re-enter the formula as =SORTBY(array, by_array, sort_order).

Is SORTBY available in all Excel mobile versions?

SORTBY requires Microsoft 365 or a current app version that supports dynamic arrays. If your Excel build does not support it, update the app or use WPS Office.