INDEX/MATCH Returning the wrong value. What did I do wrong?

£可爱£侵袭症+ 提交于 2020-01-15 15:39:53

问题


I'm trying to create an spreadsheet where INDEX/MATCH automatically populates monthly sales goals. However, it is returning the wrong number.

In cell B6 I want the value to be 10000. In columns G and H, I've set the goals and the corresponding date in the hopes of matching the goal to the date in row 2.

B6 is returning "6000" AND "7/19/2015" in an adjacent cell when it should just be returning "10000" ... and I don't know why.

In H6 the goal for the 7/12/2015 is set at 10,000 from cell G6, which corresponds to the date in B2, so I don't know why it is returning the date AFTER the one I'm matching.

Thanks


回答1:


The second part of the formula, the match part, needs to have "H3:H9", not G. The match is looking for your B2 (a date) in the range $G$3:$G$9, which is numbers so there won't be a return of the date.

Edit: And @Jeeped makes a good point, since the dates are going to be found in your table, you would probably be better using "0" instead of "1" at the end - "0" will look for an exact match. If you keep 1, it might return a false positive (return a date that is NEAR your lookup date, not the exact one).




回答2:


Place in B6 and copy across:

=INDEX($G3:$G9,MATCH(B2,$H3:$H9,1))


来源:https://stackoverflow.com/questions/31298561/index-match-returning-the-wrong-value-what-did-i-do-wrong

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!