B
C
D
E
4
2
4
2 Result
5
1
9
=IF(HLOOKUP($D$4,$B5:$C5,1,TRUE)=$D$4,"X",1)
1
6
2
17
=IF(HLOOKUP($D$4,$B6:$C6,1,TRUE)=$D$4,"X",SUM($D5,1))
X
7
3
11
=IF(HLOOKUP($D$4,$B7:$C7,1,TRUE)=$D$4,"X",SUM($D6,1))
#N/A
8
2
17
=IF(HLOOKUP($D$4,$B8:$C8,1,TRUE)=$D$4,"X",SUM(#REF!,1))
X
What is wrong with the formula used. It seemed that it works well in 3 out of the four cells, but not in that particular cell. The error track shows the cell "D4" and range "B7:C7" Thank you.
Jul 13, 2014 | Business & Productivity Software
Hi Geetad11
This is Horizontal lookup , used to look up value in a 2 dimensional table .It searches for a value in the top row of a table or an array of values, and then returns a value in the same column from a row you specify in the table or array. Use HLOOKUP when your comparison values are located in a row across the top of a table of data, and you want to look down a specified number of rows. The H in HLOOKUP stands for "Horizontal."
Formulae Syntax
HLOOKUP(lookup_value,table_array,row_index_num,range_lookup)
Lookup_value is the value to be found in the first row of the table. Lookup_value can be a value, a reference, or a text string.
Table_array is a table of information in which data is looked up. Use a reference to a range or a range name.
The values in the first row of table_array can be text, numbers, or logical values.
If range_lookup is TRUE, the values in the first row of table_array must be placed in ascending order: ...-2, -1, 0, 1, 2,... , A-Z, FALSE, TRUE; otherwise, HLOOKUP may not give the correct value. If range_lookup is FALSE, table_array does not need to be sorted.
Uppercase and lowercase text are equivalent.
You can put values in ascending order, left to right, by selecting the values and then clicking Sort on the Data menu. Click Options, click Sort left to right, and then click OK. Under Sort by, click the row in the list, and then click Ascending.
Row_index_num is the row number in table_array from which the matching value will be returned. A row_index_num of 1 returns the first row value in table_array, a row_index_num of 2 returns the second row value in 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 on table_array, HLOOKUP returns the #REF! error value.
Range_lookup is a logical value that specifies whether you want HLOOKUP to find an exact match or an approximate match. If TRUE or omitted, an approximate match is returned. In other words, if an exact match is not found, the next largest value that is less than lookup_value is returned. If FALSE, HLOOKUP will find an exact match. If one is not found, the error value #N/A is returned.
Remarks
Example
The example may be easier to understand if you copy it to a blank worksheet.
Oct 06, 2010 | Microsoft Excel for PC
Sep 04, 2009 | Microsoft Excel for PC
Jan 10, 2009 | Microsoft Office Standard for PC
Nov 13, 2008 | Business & Productivity Software
Jul 17, 2008 | Microsoft Office Professional 2007 Full...
Mar 07, 2008 | Microsoft Excel for PC
Mar 03, 2008 | Microsoft Excel for PC
Feb 29, 2008 | Microsoft Excel for PC
Feb 16, 2008 | Business & Productivity Software
May 16, 2014 | Microsoft Office Excel 2003 for PC
610 people viewed this question
Usually answered in minutes!
ytjh
×