hlookup - looking up the content of a CELL

hello altogether!
i am a new numbers user and actually do like it. but now with the first more sophisticated function it seems already troubled.

I am using a file with several sheets of which each is containing one table.

In sheet 1 I want to apply the function "look up cell A3 in Sheet 2 Table one within the matrix A1:A10 and show the content of the cell 2 rows below" , in spoken words. The syntax for that is =WVERWEIS(A3;Wasser :: Tabelle 1 :: A4:A8;2;FALSCH)
(sorry that it is in German WVERWEIS=HLOOKUP, Wasser :: Tabelle 1 = Water :: Table 1)

but no value can be found. I guess the problem is, that it is searched for "A3" as a word rather than for the content I have typed in in cell A3?! Is that true or is there a different mistake?

If it is true, does this then mean that already the lookup-functions limit the capabilities of numbers in comparison with excel?
And if so, than one further question, how does it work then, that a Excel document opened with Numbers can provide the content of a referenced (lookup syntaxed) cell?

would be great if anyone can help. would be a shame if this is already where i have to go back to excel again.

cheers
david

mbp 13", Mac OS X (10.6.3)

Posted on Jun 24, 2010 3:46 AM

Reply
14 replies
Sort By: 

Jun 24, 2010 5:21 AM in response to mac-a-rooney

David,

Welcome to the Numbers discussion. Your use of the HLOOKUP function appears to be an unusual one. Normally the "Rows Range" parameter would include a range of columns. Where you have A4:A8, I would expect something like A4:D8 and I would expect you to be looking for a match in the range A4:D4 in this case. The way you are using HLOOKUP with just a single column, you will either get bake the content of A5 (the second row in the 1-column range), or you will get an error, depending upon whether you get a match in A4. This could more easily and clearly been done with an IF statement.

Or perhaps I have misunderstood you.

Jerry
Reply

Jun 24, 2010 5:43 AM in response to Jerrold Green1

hey Jerry,

thanks for your response.
actually i think you might be wrong. because the formula you are describing is the VLOOKUP formular, not Hlookup as soon as I know. But maybe it is also me who is mixing up hlookup and vlookup. but since this happens sometimes i also tried already before my forst post to use vlookup instead of hlookup. but the same problem occurred. so no matter which one of the two is the right one in order to display the content of a cell two rows below the search criteria within a specific matrix the problem still remains: and that is to use a cell as the search criteria!
so it seems that cell A1 for example can not be used as the value to search for in a given matrix. unfortunately if i replace the search criteria (A1) with "peters". the name that is written in cell A1 and i am trying to search for in the other matrix, it works. therefore i guess it is the letter/number-string A1 numbers is searching for rather than the content inherent in the cell!?!?!?
but again: does this then mean that numbers reached its limits already at the point of reference formulas ??!!? can't really believe it...
Reply

Jun 24, 2010 6:05 AM in response to mac-a-rooney

mac-a-rooney wrote:
actually i think you might be wrong. because the formula you are describing is the VLOOKUP formular, not Hlookup as soon as I know.

David,

As anyone who watches this discussion has witnessed, I can and do make mistakes, but when I use any formula more complicated than an IF statement, I always look it up and refer to the Function Browser for syntax, as I did in this case. Click the Function icon on the Toolbar and choose View Function Browser. Here's a screen shot of your solution:

User uploaded file

My expression is: =HLOOKUP(A3,T1 :: $A$4:$A$8, 2,FALSE) as shown in the screen shot. Remember that your system language settings require semicolons where I have commas.

Jerry
Reply

Jun 24, 2010 7:20 AM in response to Jerrold Green1

hi Jerry,

sorry if I sounded rude. It was really not intended to be an offense. i am just not that confident with implementing pics and screen shots and so on to make it easier to understand.

but back to the topic:
I guess you example shall show pretty obvious that the formula in cell B3 does not work because the content of A3 (Dog) can not be found on the H2O Sheet Table T1. And since the search criteria A3 is not absoluted or fixed (not sure how the definition is in english), in B4 you probably search for A4, i.e. "Cat" in the below displayed tabel?! So then actually my problem is not really a problem, because what i am trying to do does work on your machine...

[IMG] http://i972.photobucket.com/albums/ae207/mac-a-rooney/Bildschirmfoto2010-06-24um 160656.png[/IMG]
here in cell A2 the reference formula is in use

[IMG] http://i972.photobucket.com/albums/ae207/mac-a-rooney/Bildschirmfoto2010-06-24um 160723.png[/IMG]
this link shows the table from which i want to retrieve the relevant data

as you can (hopefully) see on the pictures (also the first time I am implementing a picture in a forum thread) the formular does not work on my numbers. do you have any clue what i do wrong? or is it for a different reason that in your table "dog" can be found via searching for cell content A3??
Reply

Jun 24, 2010 7:36 AM in response to mac-a-rooney

David,

Your screen shot links are not working. To post here from PhotoBucket, mouse over the image that you want to link to and click on the field below the image that is called HTML Code. Copy that text string and Paste it here in the forum.

You wrote:
I guess you example shall show pretty obvious that the formula in cell B3 does not work because the content of A3 (Dog) can not be found on the H2O Sheet Table T1.


That is proof that the formula does work. The function is supposed to return an error condition when the search is not satisfied. It is not the function's fault that the value you searched for is not present in the target range.

I look forward to seeing your screen shots and trying to understand the problem better.

Jerry
Reply

Jun 24, 2010 8:27 AM in response to Jerrold Green1

hi jerry,

in the meawhile i tried it several times, and sometimes it did work indeed, but in the majority of tries it simply didn't. i have really no idea where the mistake is??

here the links:

http://i972.photobucket.com/albums/ae207/mac-a-rooney/Bildschirmfoto2010-06-24um 160723.png?t=1277393069

http://i972.photobucket.com/albums/ae207/mac-a-rooney/Bildschirmfoto2010-06-24um 160656.png?t=1277393117
Reply

Jun 24, 2010 8:43 AM in response to mac-a-rooney

David,

OK, we're making progress now. Your current formula has two problems that I can see.

First, the Function is not being recognized by the compiler because it isn't spelled correctly for the localization you are presently set to. I can tell this because the function name would have been converted to all caps if it had been recognized.

Second, in your screen shots you have two Sheets with a reference from one to the other. We we do this we must include the sheet name in the reference. The proper reference in this case would be: "Blatt 2 :: Addresses :: B".

Let's make those two changes and see what happens.

Jerry
Reply

Jun 24, 2010 9:42 AM in response to Jerrold Green1

Hi Jerry!

I found the mistake, not nearly that sophisticated as you, though. Actually I did not really get what you said here:

"because the function name would have been converted to all caps if it had been recognized."

caps=captures? but what are the captures? is it just the reference how it appears in the formula syntax?

Nonetheless my file is working. And I also found out why it worked before sometimes and sometimes not:
In numbers there is always a sheet that includes at least one table. In my example the sheet (called "Blatt 1") was Addresses with the Tabel "Table 1" if I remember it correctly. Not what I did was to select the Matrix after just clicking on the SHEET-Tab (i guess this is where the wrong "cap" comes from, too). To make it work - without knowing how the cap hast to look like 😉 - one has to click on the concrete table from which the matrix shall be selected!

that's it.

but if you want to elaborate a bit more on the to me still unclear statement from your above post i would be delighted to read your extensions 😉

thanks anyway!
david
Reply

Jun 24, 2010 10:17 AM in response to mac-a-rooney

mac-a-rooney wrote:
Actually I did not really get what you said here:

"because the function name would have been converted to all caps if it had been recognized."

caps=captures? but what are the captures? is it just the reference how it appears in the formula syntax?

David,

We are speaking about font case. Caps is short for Capital Letters, or Upper Case, as opposed to Lower Case. The "C" in "Caps" is upper case and we say that the word is "capitalized". "CAPS" is an example of "all caps". Numbers converts the function name to "All Caps" when it is recognized by the compiler, so in the English mode "Hlookup" will become "HLOOKUP".

Jerry
Reply

Jun 25, 2010 12:37 AM in response to Jerrold Green1

mornin Jerry,

yeah right, some computers show you a short pop up message "caps locked" or somthing like that by pressing the key above shift! did'nt really get it in the content, my bad. so thank you for that.

it means then, that the function, i.e. HLOOKUP, VLOOKUP, etc., has to be written in capital letters, as an indicator for the user, to have a chance that the function will work at all. but this condition of "all caps" only holds for the funktion's name (hlookup, sum, ...) not for the arguments within it. so by referring to a table which is named and written in lower case letters, say addresses, then this is also how it appears as an argument within the formular.
Therefore, and that might be crucial for all other observers of this thread, one is really urged to carefully watch out to select the TABLE rather than just the Sheet when selecting the search matrix!
...and pls correct me if I am wrong...

so thank you very much for your help Jerry!

regards
david
Reply

Jun 25, 2010 2:58 AM in response to mac-a-rooney

My own tip:

always type the function names in lowercase.
So, if there is a typo we are warned of it : the name remains in lowercase.
If the spelling is correct the name automatically switch in UPPERCASE.

In your screenshot, if hlookup appeared in lowercase, I guess that it's because your system is set to use Deutsch. If I am right hlookup needed to be spelled : wverweis. With this spelling, it would be displayed as : WVERWEIS .

Remember that on the forum, formulas are given for a system running with English settings:
English wording, period as decimal delimiter, comma as parameters separator.

You system settings seems to be :
Deutsch spelling, comma as decimal delimiter, semi colon as parameters separator.

Yvan KOENIG (VALLAURIS, France) vendredi 25 juin 2010 11:58:31
Reply

Jun 25, 2010 1:46 PM in response to mac-a-rooney

mac-a-rooney wrote:
it means then, that the function, i.e. HLOOKUP, VLOOKUP, etc., has to be written in capital letters, as an indicator for the user, to have a chance that the function will work at all. but this condition of "all caps" only holds for the funktion's name (hlookup, sum, ...) not for the arguments within it. so by referring to a table which is named and written in lower case letters, say addresses, then this is also how it appears as an argument within the formular.


No. It means the formula parser will automatically change a function name to ALLCAPS if it recognizes the function, which, as Yvan points out, may be used by the user as an check for typos. Cell addresses typed as "b4" will also be changed to "B4", but only when the formula is confirmed by pressing enter/return, tab, or the Accept button.

Cells references including a Name are case sensitive. "Table 1" is not the same as "table 1" (or as "TABLE 1" and will not be recognized unless the spelling matches in case as well as by letters.

Therefore, and that might be crucial for all other observers of this thread, one is really urged to carefully watch out to select the TABLE rather than just the Sheet when selecting the search matrix!
...and pls correct me if I am wrong...


The user must specify enough information to uniquely identify the search location. For cell B2, on the same table as the cell referencing it, "B2" is sufficient.

For B2 on a table other than the table of the cell referencing it, the Table Name and "B2" are usually necessary.

For B2 on a table on a sheet other than the sheet containing the table of the referring cell, the Sheet Name, Table name and "B2" are usually necessary

The cell reference may be typed into the formula bar, or may be entered by clicking on the cell itself.

Examples:

User uploaded file

From top to bottom:

1 The error message is a bit misleading. The error is in the sheet name (lower case s) and the table name (lower case t).

2. Formula created by:
Type =
Click Sheet 1, then Click B3 on Table 1 (of Sheet 1).
Click Accept (green check)

3. Formula created by typing into Formula Bar. Note lower case b in "b2".

4. Result after clicking Accept (green check) in 3.

Regards,
Barry
Reply

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.

hlookup - looking up the content of a CELL

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