Question about Microsoft Office Excel 2003 for PC

# HLOOKUP and IF formula netting problem

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.

Posted by on

• Anonymous Feb 17, 2009

ytjh

×

• Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

• Expert

The value of C7cannot be found in the range - Hence the error.

Posted on May 22, 2009

Hi,
a 6ya Technician can help you resolve that issue over the phone in a minute or two.
Best thing about this new service is that you are never placed on hold and get to talk to real repair professionals here in the US.
Goodluck!

Posted on Jan 02, 2017

×

my-video-file.mp4

×

## Related Questions:

### Countif formulas

Are you trying to find how many don't have a letter? If so you might try "COUNTA" instead of "COUNTIF". You could also try looking at the format of the cell your formula is in and change it to general or number.

Jul 13, 2014 | Computers & Internet

### My MS Excel vlookup function ASCII type table contains both upper case and lower case letters, characters like ( and % or *, and numbers. It seems to return the numerical equivalent of upper case letters...

Correct a #N/A error Show All Hide All This error occurs when a value is not available to a function or formula.
1. Optionally, click the cell that displays the error, click the button that appears , and then click Show Calculation Steps if it appears.
2. Review the following possible causes and solutions. Missing data, and #N/A or NA() has been entered in its place
Replace #N/A with new data.
Note You can enter #N/A in those cells where data is not yet available. Formulas that refer to those cells will then return #N/A instead of attempting to calculate a value.
Giving an inappropriate value for the lookup_value argument in the HLOOKUP, LOOKUP, MATCH, or VLOOKUP worksheet function
Make sure that the lookup_value argument (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) is the correct type of value — for example, a value or a cell reference, but not a range reference. Using the VLOOKUP, HLOOKUP, or MATCH worksheet function to locate a value in an unsorted table
By default, functions that look up information in tables must be sorted in ascending order. However, the VLOOKUP and HLOOKUP worksheet functions contain a range_lookup argument (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) that instructs the function to find an exact match even if the table is not sorted. To find an exact match, set the range_lookup argument to FALSE. The MATCH worksheet function contains a match_type argument that specifies the order the list must be sorted in to find a match. If the function cannot find a match, try changing the match_type argument. To find an exact match, set the match_type argument to 0.
Using an argument in an array formula that is not the same number of rows or columns as the range that contains the array formula
If the array formula (array formula: A formula that performs multiple calculations on one or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are entered by pressing CTRL+SHIFT+ENTER.) has been entered into multiple cells, make sure that the ranges referenced by the formula have the same number of rows and columns, or enter the array formula into fewer cells. For example, if the array formula has been entered into a range 15 rows high (C1:C15) and the formula refers to a range 10 rows high (A1:A10), the range C11:C15 will display #N/A. To correct this error, enter the formula into a smaller range (for example, C1:C10), or change the range to which the formula refers to the same number of rows (for example, A1:A15).
Omitting one or more required arguments from a built-in or custom worksheet function
Enter all arguments (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) in the function.
Using a custom worksheet function that is not available
Make sure that the workbook that contains the worksheet function is open and the function is working properly.
Running a macro that enters a function that returns #N/A
Make sure that the arguments (argument: The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names.) in the function are correct and in the correct position.

Oct 31, 2008 | Computers & Internet

### Plz tell me Sir/Madam. what is Hlookup And give me example

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

• If HLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than lookup_value.
• If lookup_value is smaller than the smallest value in the first row of table_array, HLOOKUP returns the #N/A error value.

Example
The example may be easier to understand if you copy it to a blank worksheet.

Oct 06, 2010 | Microsoft Excel for PC

### Hello i want to use h LOOK UP

Hi !!

How to implement Hlookup function:
• Select your data and sort it in ascending order
• Then type '=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 in the sort dialog box, 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.
• If HLOOKUP can't find lookup_value, and range_lookup is TRUE, it uses the largest value that is less than lookup_value.
• If lookup_value is smaller than the smallest value in the first row of table_array, HLOOKUP returns the #N/A error value.
• If range_lookup is FALSE and lookup_value is text, you can use the wildcard characters, question mark (?) and asterisk (*), in lookup_value. A question mark matches any single character; an asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.
• In the example in the Excel training video the sorted data represents the density of water at different temperatures. The left most column gives the temperature in degrees and the top column specifies the 'decimal' degrees
• We looked up the density of water at 5.4 degrees celsius using the Hlookupfunction.

Still have problems, Check this video on the you tube.

Hope this would help,

Thanks,
Anurag Shukla

Sep 04, 2009 | Microsoft Excel for PC

### IF Formula

You can use this formula
=IF(A2<=100,"Within budget","Over budget")
Which means
If the number above is less than or equal to 100, then the formula displays "Within budget". Otherwise, the function displays "Over budget" (Within budget)
or you and try something like this
=IF(A2=100,SUM(B5:B15),"")
which means
If the number above is 100, then the range B5:B15 is calculated. Otherwise, empty text ("") is returned ()
I got these examples from the help within Exel they give several more examples and more expaination.

Jan 10, 2009 | Microsoft Office Standard for PC

### HLOOKUP IN MS EXCEL

lookup value = value searched

table array = database

topmost row of lookup array must contain the data IDs and all IDs must be sorted in ascending order.

row index number = row number containing data to be shown; first row = 1

hlookup(x,tablearray,y) will look for x on the first row of the lookup table and return the value in the cell on the yth row

if formula cannot file exact x, it will look for the value closest to. but not greater than x

Nov 13, 2008 | Computers & Internet

### H look up

Hi vrusha,

Your right hlookup is very simular to vlookup, the key difference is it searches along the top row of the table, finds the matching data and gives you one of the below cells (depending on how you write the formula), just think of a vlookup on it's side.

The formula works like this:
=HLOOKUP(lookup value, table, row_index_number, range_lookup)

lookup value = is the value you want to match against the table i.e. ABBA

table = the range of cells that make up the table you want to search i.e. A1:D300

row_index_number = the number of rows from the top of the table you want to get the value from, 1 is the top of the table, 2 is directly below

range_lookup = if you want an exact match type FALSE, if you want the nearest match type TRUE

Jul 17, 2008 | Microsoft Office Professional 2007 Full...

### Formular to show number and cell references

The formula for A1 is: =SUM(B4,B5)
A2 is: =SUM(C4,C5)
A3 is: =SUM(A1:A2)

To test this, put 25 in cell B4, 25 in cell B5, then 30 in cell C4, and 30 in cell C5.....the result in cell A3 is 110.

Hope this helps.

Mar 07, 2008 | Microsoft Excel for PC

### Blank cell help

You can use an IF statement:

IF(logical_test,value_if_true,value_if_false)

In your case, this would be:

=IF(B6<>"",SUM((B6+D6)-(B5+C6)),"")

This works as follows:

IF(B6<>"", : If B6 is not equal to nothing, ie. it equals something

SUM((B6+D6)-(B5+C6)), : Set the value as per the equation

"") : Otherwise set the value to nothing.

Of course, this only checks that there is a value in B6. Depending on that value (and that of the other cells) you could still get a negative result. The way to avoid this would be to use the following:

=IF((SUM((B6+D6)-(B5+C6))>0),SUM((B6+D6)-(B5+C6)),"")

A bit long winded, but basically it checks the result of the sum is greater than 0. If it is it displays it, if not it leaves the cell blank.

Hope this helps,

Matt

Mar 03, 2008 | Microsoft Excel for PC

### =if

=IF(C5>B5,0,B5*2)
this means if it is true that C5>B5 then the cell = 0,
but if it is not true, means C5< or = B5, the cell will be B5*2
You can change the numbers as you need.
To use function easily, you can click "Insert" --> function --> then choose in the "select a function" -> OK.
Then follow the instructions. Very clear to follow

Feb 29, 2008 | Microsoft Excel for PC

#### Related Topics:

611 people viewed this question

Level 3 Expert

Level 3 Expert