• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Index - not working|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Index - not working|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…Index - not working
sp_PrintTopic sp_TopicIcon
Index - not working
Avatar
angela yen
Member
Members
Level 0
Forum Posts: 11
Member Since:
August 28, 2019
sp_UserOfflineSmall Offline
1
August 28, 2019 - 3:18 pm
sp_Permalink sp_Print

Hi Mynda,

My Index formula is not working properly in the presentation worksheet, of which the figures are extracted from the data worksheet.

By right, when the column is "0", it is out of range and should have returned with an error result. But instead I tried out in 3 sets of column with the same row and "0" column, it returned with different results taken from the same range.

a. Is it a norm?

b. Is it because I am working on 2 different worksheet?

c. What did I do wrong?

Your enlightenment is much appreciated.

Best regards

Angela

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
August 28, 2019 - 10:24 pm
sp_Permalink sp_Print

Hi Angela,

When you place a zero in the row or column number arguments for INDEX it will return the whole row/column. Tip, wrap your formual in SUM like this:

=SUM(INDEX(INDIRECT(E$15),$I10,$J10))

and you'll see it adds up the values in row 5 of the Data sheet. 

However since you can't place the results of the whole row in a single cell, it will return the value at the implicit intersection of the cell. In this case, it is returning the value that is in column E of the Data sheet. i.e. the same column that your formula is in.

So, yes this is normal behaviour. If you want it to return the value from column C, then you should input the col_num argument as 1, not zero.

Mynda

Avatar
angela yen
Member
Members
Level 0
Forum Posts: 11
Member Since:
August 28, 2019
sp_UserOfflineSmall Offline
3
September 3, 2019 - 11:49 pm
sp_Permalink sp_Print

Hi Mynda, 

Thanks so much for your quick reply and your advice. 

When I inserted 3 columns in the data worksheet, the 1st column data appears error #value on the presentation worksheet. (I have attached another file for your easy reference.)

Why is it so? INDEX seems to be an unstable formula.

Other than 1 and above for column in INDEX, what are things that I need to look out for in INDEX?

 

Best regards

Angela

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
4
September 9, 2019 - 8:36 am
sp_Permalink sp_Print

Hi Angela,

Sorry for the slow reply. Your workbook isn't attached. Can you please upload it again?

Mynda

Avatar
angela yen
Member
Members
Level 0
Forum Posts: 11
Member Since:
August 28, 2019
sp_UserOfflineSmall Offline
5
September 9, 2019 - 5:00 pm
sp_Permalink sp_Print

Hi Mynda, 

Sorry, I guess when I uploaded the file earlier it was not attached properly. Hereby I attach the file again. Thanks again Mynda

 

Best regards

Angela

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 689
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
6
September 9, 2019 - 6:17 pm
sp_Permalink sp_Print

Since your data range starts in column F, but you have put the formula in column E, there is no implicit intersection and you get a #VALUE error because, as Mynda said earlier, you can't return an entire array to one cell.

Avatar
angela yen
Member
Members
Level 0
Forum Posts: 11
Member Since:
August 28, 2019
sp_UserOfflineSmall Offline
7
September 11, 2019 - 10:25 am
sp_Permalink sp_Print

Hi Velouria and Mynda,

Thanks for your reply. Actually, my question is  - with the same index formula ie same range with column 0, why in both the above attached files, one appears with a value but the other with #VALUE. It doesn't make sense.

As I am using INDEX formula, the row and column are taken from the external cell. These external cell are in formula and may have return with "0". Hence, I need to know if it returns with a zero "0", the INDEX formula should give me #VALUE and not a VALUE. This will serve as an alert to me.

How can I be sure it will give me a #VALUE, instead of a value?

 

Best regards

Angela

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1549
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
8
September 11, 2019 - 12:48 pm
sp_Permalink sp_Print

Hi Angela,

Have you read the article on implicit intersection that Mynda linked to?

Because you are not specifying a column for INDEX to use in it's lookup, it takes the column number of the column that the formula is in on the Presentation sheet - this is implicit intersection. 

So in cell E10 it is actually looking up =INDEX(INDIRECT(E$15),1,5) but in your Data sheet you don't have any data in column 5 which is Col E.

You'll notice that the values in Col F and Col G on the Presentation sheet correspond to the values in Col F and Col G on the Data sheet.

If you delete column C or column D or column E on your Data sheet (they are all empty) you'll see that your formulae work.

Regards

Phil

Avatar
angela yen
Member
Members
Level 0
Forum Posts: 11
Member Since:
August 28, 2019
sp_UserOfflineSmall Offline
9
September 12, 2019 - 11:21 pm
sp_Permalink sp_Print sp_EditHistory

Dear Philip

Thanks for your reply.

I don't think I would ever understand why the EXCEL developer team would let the column number (in letters) to play a role that will determine the return whether it is a value or an error when the INDEX column is 0. 

Guess I just have to accept that's how it is in EXCEL - implicit intersection.

Thanks so much for your enlightenment.

I have attached a file for those who may have the same question.

 

Best regards

Angela

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Lakisha Hall, Ric Wade, Tracy English, David Birch, QSolutions Group
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
Jennifer Rodriguez-Avila
Khaled Ibrahim
Kiran Supekar
Lisa Myers
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Christy Nichols
Harald Endres
Forum Stats:
Groups: 3
Forums: 24
Topics: 6530
Posts: 28602

 

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

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • 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

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

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

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.