ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Need formula to create a value in a single cell by searching a range (https://www.excelbanter.com/excel-programming/432276-need-formula-create-value-single-cell-searching-range.html)

Stunzer

Need formula to create a value in a single cell by searching a range
 
I am attempting to create a value(an error message actually) in a single cell
by "searching" for a given value anywhere in a column or range of cells. The
searched for value in the column is in response(via a formula) to certain
criteria from other values in other cells within same row(using IF, OR, AND
commands).
Does anyone have a fomula that would help me?


Rick Rothstein

Need formula to create a value in a single cell by searching a range
 
You can use this formula as a guide...

=IF(COUNTIF(E4:H20,D1),"Value found in range!","Value not found!")

Change the range to suit, D1 is assumed to contain the value you are
searching for, or you can hard-code the value (example value 123) in like
this instead...

=IF(COUNTIF(E4:H20,123),"Value found in range!","Value not found!")

--
Rick (MVP - Excel)


"Stunzer" <u53932@uwe wrote in message news:9a7196c227c8a@uwe...
I am attempting to create a value(an error message actually) in a single
cell
by "searching" for a given value anywhere in a column or range of cells.
The
searched for value in the column is in response(via a formula) to certain
criteria from other values in other cells within same row(using IF, OR,
AND
commands).
Does anyone have a fomula that would help me?



Stunzer

Need formula to create a value in a single cell by searching a range
 
Rick,

Awesome, worked well & is exactly what I needed...thanks for the quick
response also...

Stu

Rick Rothstein wrote:
You can use this formula as a guide...

=IF(COUNTIF(E4:H20,D1),"Value found in range!","Value not found!")

Change the range to suit, D1 is assumed to contain the value you are
searching for, or you can hard-code the value (example value 123) in like
this instead...

=IF(COUNTIF(E4:H20,123),"Value found in range!","Value not found!")

I am attempting to create a value(an error message actually) in a single
cell

[quoted text clipped - 5 lines]
commands).
Does anyone have a fomula that would help me?




All times are GMT +1. The time now is 07:37 PM.

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