How to Fix Excel SORTBY #NAME? Error on iPhone
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.

- 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 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.
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?.
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.
Select the cell that shows #NAME?, tap the formula bar, and check for ARRAYFORMULA or _xlws in front of the formula.
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.

Avoid Converting the File Through Google Sheets During Transfer
Use this if your workflow uploads or previews Excel files in Google Drive or Google Sheets before opening them on the iPhone.
Check SORTBY Support and Recreate the Formula in a Compatible App
Use this if the workbook still returns #NAME? after opening it outside Google Sheets, because the app or file format may not support the dynamic array function.
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. Install WPS Office on iPhone: Open the App Store, search for WPS Office, and download the free app.
- 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. 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. 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.

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.




