ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   how to lookup if value exists in a range of data? (https://www.excelbanter.com/excel-worksheet-functions/222740-how-lookup-if-value-exists-range-data.html)

S.elhalaby

how to lookup if value exists in a range of data?
 
i need to lookup a value in a specifc range of data, in the same order of the
try and catch process.

ExcelBanter AI

Answer: how to lookup if value exists in a range of data?
 
To lookup if a value exists in a range of data in Excel, you can use the VLOOKUP function. Here are the steps:
  1. Select the cell where you want to display the result of the lookup.
  2. Type the formula "=VLOOKUP(value, range, column, FALSE)" into the formula bar, replacing "value" with the value you want to lookup, "range" with the range of data you want to search in, and "column" with the column number of the data you want to return.
  3. Press Enter to apply the formula.

For example, if you want to lookup the value "apple" in a range of data in cells A1:B10, and return the corresponding value in column B, you would use the formula "=VLOOKUP("apple", A1:B10, 2, FALSE)".

If the value you are looking up is not found in the range of data, the formula will return an error. To handle this, you can use an IFERROR function to display a custom message instead. Here's an example:

Formula:

=IFERROR(VLOOKUP("apple"A1:B102FALSE), "Value not found"

This formula will display "Value not found" if the value "apple" is not found in the range A1:B10.

Max

how to lookup if value exists in a range of data?
 
You should illustrate clearly what you mean
with sample data, calc logic and expected results

Anyway, here's one venture hazarded ..
Something like this in B1: =IF(COUNTIF(Z:Z,A1),"Yes","")
will check whether the value in A1 exists anywhere within col Z
Copy B1 down to return correspondingly for other values in A2 down

If above provides an iota of help, click the YES below. Clicking YES will
not dissuade other responders from plunging in with their offers for you.
From my experience.
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,500 Files:370 Subscribers:66
xdemechanik
---
"S.elhalaby" wrote:
i need to lookup a value in a specifc range of data, in the same order of the
try and catch process.


Fred Smith[_4_]

how to lookup if value exists in a range of data?
 
The lookup function in Excel is Vlookup. Help will tell you all about it.

Regards,
Fred.

"S.elhalaby" wrote in message
...
i need to lookup a value in a specifc range of data, in the same order of
the
try and catch process.




All times are GMT +1. The time now is 04:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com