• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How to remove #N/A from cell if I am using an array formula and can not use IFERROR function|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How to remove #N/A from cell if I am using an array formula and can not use IFERROR function|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…How to remove #N/A from cell if I a…
sp_PrintTopic sp_TopicIcon
How to remove #N/A from cell if I am using an array formula and can not use IFERROR function
Avatar
MG BasheerH
Member
Members
Level 0
Forum Posts: 13
Member Since:
December 17, 2020
sp_UserOfflineSmall Offline
1
December 23, 2020 - 5:55 am
sp_Permalink sp_Print sp_EditHistory

Hi,

When I am using an array function like in this video.

Some cells show the result #N/A.

I used to add the IFERROR for any formula resulted #N/A like VLOOKUP.

But when I tried to add IFERROR to an array formula like the multi mode function in this video it gives me an error.

Any idea how to do so?

Thanks

sp_AnswersTopicSeeAnswer See Answer
Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1514
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
2
December 23, 2020 - 8:41 am
sp_Permalink sp_Print

Hi,

Please attach your workbook so we can see what you are doing.

Regards

Phil

Avatar
MG BasheerH
Member
Members
Level 0
Forum Posts: 13
Member Since:
December 17, 2020
sp_UserOfflineSmall Offline
3
December 23, 2020 - 4:01 pm
sp_Permalink sp_Print sp_EditHistory

Hi Philip,

OK, check attached file.

Thanks

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 615
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
4
December 23, 2020 - 8:11 pm
sp_Permalink sp_Print

The error is not actually returned by the formula, which is why IFERROR doesn't work, it's because the result array has fewer 'rows' than the range you have entered the formula into, so Excel reflects that by showing you #N/A. You could use this normally entered formula entered into H2 and copied down:

 

=IF(COUNT(MODE.MULT($B$2:$D$21))<ROWS($A$1:$A1),"",INDEX(MODE.MULT($B$2:$D$21),ROWS($A$1:$A1)))

sp_AnswersTopicAnswer
Answers Post
Avatar
MG BasheerH
Member
Members
Level 0
Forum Posts: 13
Member Since:
December 17, 2020
sp_UserOfflineSmall Offline
5
December 24, 2020 - 12:07 am
sp_Permalink sp_Print sp_EditHistory

@Velouriarn

Thanks a lot for your reply.

Yes that is exactly what I am looking for 🙂

Please, is it possible that you may thankfully explain the formula you provided above as you used several functions within it.

Also, does using the formula your provided convert this formula from an array to regular formula?

As I did double clicked each part of the formula to check its arguments and tried to understand what you did, but I am afraid that I am not getting it correctly as fine.

If you have some few minutes to write the logic you followed that would be awesome and I do appreciate your valuable time.

Thanks my friend 🙂

MG!

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 615
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
6
December 24, 2020 - 2:28 am
sp_Permalink sp_Print

COUNT(MODE.MULT($B$2:$D$21)) tells you how many numbers are returned by your original function (7 in this example)

ROWS($A$1:$A1) returns a sequence from 1 as you copy it down (since it becomes ROWS($A$1:$A2), then ROWS($A$1:$A3 and so on)

so for each row, the first part of the formula checks if the number of values in the result array is less than the number of rows we have copied the formula into, and returns "" if we have run out of numbers.

Now, since MODE.MULT($B$2:$D$21) returns an array of numbers, we can pass this to an INDEX function to return one specific value. In the first formula row, we are using:

INDEX(MODE.MULT($B$2:$D$21),ROWS($A$1:$A1))

which is the same as:

INDEX(MODE.MULT($B$2:$D$21),1)

so it returns the first value in the array. In the next row, ROWS($A$1:$A2) returns 2, so we get the second value, and so on.

 

Does that help?

Avatar
MG BasheerH
Member
Members
Level 0
Forum Posts: 13
Member Since:
December 17, 2020
sp_UserOfflineSmall Offline
7
December 24, 2020 - 3:47 am
sp_Permalink sp_Print

Thanks a lot and much appreciated.

And why there is an IF in the early beginning of the formula? as you did not mentioned its usage in your reply.

Thanks a lot 🙂

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 615
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
8
December 24, 2020 - 8:39 pm
sp_Permalink sp_Print

Sorry, it was implicit in this sentence:

 

"the first part of the formula checks if the number of values in the result array is less than the number of rows we have copied the formula into"

Avatar
MG BasheerH
Member
Members
Level 0
Forum Posts: 13
Member Since:
December 17, 2020
sp_UserOfflineSmall Offline
9
December 24, 2020 - 8:44 pm
sp_Permalink sp_Print

Totally much appreciated your time to explain it in detail.

Avatar
Duncan Williamson
Member
Members
Level 0
Forum Posts: 11
Member Since:
December 23, 2020
sp_UserOfflineSmall Offline
10
December 26, 2020 - 9:32 am
sp_Permalink sp_Print sp_EditHistory

Adding the MODE.MULT() function using Ctr+Alt+Del will return the #N/A errors you found because that is what it was designed to do. It is telling you that you have just selected too many alternatives and, in your case, there are just 7 modal values

If you use MODE.MULT() as a Dynamic Array function, that is, enter the function in H2 in your file and just press Enter, it will SPILL the correct answers to H8 and you will not see the #N/A errors. Hence, no need to worry about using the IFERROR() function if all else is well!

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Andy Kirby, Scott Miller, Roy Lutke, Jeff Krueger, Ivica Cvetkovski
Guest(s) 7
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
John Chisholm
vexokeb sdfg
John Jack
Malcolm Toy
Ray-Yu Yang
George Shihadeh
Naomi Rumble
Uwe von Gostomski
Jonathan Jones
drsven
Forum Stats:
Groups: 3
Forums: 24
Topics: 6212
Posts: 27236

 

Member Stats:
Guest Posters: 49
Members: 31889
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.