Use HLOOKUP to find data horizontally

Finds the specified value in the first row of a table or array of values, and returns the value at the specified row in the current column of the table or array.

When the comparison value is in the first row of the data table and you want to look for data in a given row below, use the function HLOOKUP.

When the comparison value is in the column to the left of the data you are looking for, use the function VLOOKUP.

The H in HLOOKUP stands for “row.”

grammar

HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)

lookup_value is the value to look for in the first row of the data table. lookup_value can be a number, a reference, or a text string.

Table_array is the data table in which you want to look for data. References to regions or region names can be used.

The first row of Table_array can be a text, numeric, or logical value.

  • If range_lookup is TRUE.

The first row of table_array must be sorted in ascending order:… -2, -1, 0, 1, 2,… , A-Z, FALSE, TRUE;

Otherwise, the HLOOKUP function will not give the correct value.

If range_lookup is FALSE, table_array does not have to be sorted.

  • The text is not case sensitive.
  • Values can be arranged in ascending order from left to right in the following way:

Select a value, click Sort in the Data menu, then click Options, then click Sort by Row option, and finally click OK.

In the Sort By drop-down list box, select the corresponding row option, and then click the Ascending option.

row_index_num indicates the row number of the matching value to be returned in table_array.

If row_index_num is 1, return the value of the first row of table_array.

When row_index_num is 2, return the value of the second row of table_array, and so on.

If row_index_num is less than 1, HLOOKUP returns the #VALUE! Error value. ;

If row_index_num is greater than the number of rows in table-array, HLOOKUP returns the #REF! Error value. .

Range_LOOKUP is a logical value that indicates whether HLOOKUP is an exact match or an approximate match.

If TRUE or omitted, an approximate matching value is returned.

That is, if no exact match is found, the maximum value less than lookup_value is returned.

If range_value is FALSE, the function HLOOKUP looks for an exact match and returns the #N/A! Error value if it cannot be found. .

Instructions

  • If HLOOKUP cannot find lookup_value and range_lookup is TRUE, the maximum value less than lookup_value is used.
  • If HLOOKUP is less than the minimum value in the first row of table_array, HLOOKUP returns the error #N/A! .

I want to create a clean, concise and efficient office reference manual, in order to maintain a good reference experience, I did not add any third-party advertisements in my blog, of course, if you are willing, you can watch the following video, it can bring me some income, so that I can better maintain the server to provide higher quality service, thank you for your help and support.

You can choose any link below to watch my videos and I will earn some money to strengthen the site and resist DDOS attacks that may happen at any time, thank you for your support!
(Please note: Please do not maliciously click on links or video ads to increase invalid traffic, as this can result in lower or no revenue.)

Learn to consult the manual video

(Will be released in the later period with the consult the manual article, please pay attention.)

My Febspot video list (Learn after-school relaxation videos)

https://suu.us/sponsor

My Febspot video home page

https://www.febspot.com/leet4477/