Inconsistent VLOOKUP formula results with same formula

I am having some issues with VLOOKUP (I'm a new iMac user, but an advanced Excel user). In a small table of value, when copying the same VLOOKUP formula down the column, some work and some come up with 'invalid reference" error. Just spent an hour and a half in a ONEtoONE at the Apple store and we couldn't figure it out for the life of us. It started with me wanting to add two VLOOKUP formulas together and that didn't work, then we realized that by copying the formula down some rows worked and some didnt. Very odd. Thoughts??

The formula is basic =VLOOKUP(A2, Breakfast Tab Name:Cost, Return Value of Cost, Exact Match)


User uploaded file

Source Table:

User uploaded file


The blank cells are the ones with the "invalid reference" error (red triangle with whote exlamation point". We tried a brand new workbook on another machine and the VLOOKUP wouldn't work at all. I have tried sorting all tables alphabetically, doesn't help. The weird thing is that when you copy the entre list of breakfast items into the rows beneath the ones in the sample above, they also all came back as errors. Yes, the names are exactly the same in both the source and destination tables as they have been copied/pasted over. Also in playing around and copying the formula a few rows down but pointing to one of the items above, it returned the name of the item, not the cost.


I hope I explained this clearly enough, I just can't understand why some rows work and some don't. If I was using the function wrong, then they would all be errors, right?


Thanks Community!!


Cheers,

Ren

iMac (27-inch, Late 2013), OS X Mavericks (10.9.1)

Posted on Dec 29, 2013 7:08 PM

Reply
5 replies

Dec 29, 2013 7:44 PM in response to ren9666

wanting to add two VLOOKUP formulas together and that didn't work,


If you're trying to add Breakfast to Lunch, etc. one way approach you could take would look like this (I've only done Breakfast and Lunch but adding Dinner and Snack would be similar):


User uploaded file


Formula: =VLOOKUP(A2,Source Table::A:B,2,0)+VLOOKUP(B2,Source Table::A:B,2,0)


As in Excel, VLOOKUP needs the value you want to look up, the range you are looking it up in, the column number in the range that contains the value you want to retrieve, and a parameter that specifies an exact match).


SG

Dec 29, 2013 7:48 PM in response to SGIII

Thank you so much SGIII I really appreciate it!! That worked for adding the functions of breakfast and lunch items together. So by simplifying and using the values of 2 for the resulting value column and 0 for exact match the formulas work consistently. Being a new iMac user I thought the "bubble" and description labels were very cool, but I guess less is better.


Thanks for your help!!!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Inconsistent VLOOKUP formula results with same formula

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.