ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Help with a IF formula (https://www.excelbanter.com/excel-worksheet-functions/259579-help-if-formula.html)

Pascale

Help with a IF formula
 
Hi,

I was wondering if it is possible to have if and research in the same formula?

I need to have a fomula that looks into a cell for a certain item described
in a list and if its not there to search into a second set of data . and if
its in either to right nothing for the moment, I may need to add more later.

Thank you for your help!

Paul C

Help with a IF formula
 
You can nest your conditions lke this

IF(Test for first value, return answer, IF(check for second value,return
answer,0))

=IF(NOT(ISERROR(MATCH(A1,B1:B10,0))),"First One
Found",IF(NOT(ISERROR(MATCH(A1,C1:C10,0))),"Second One Found",0))

In this sample If A1 is found in B1:B10 the formula will yield "First One
Found", If A1 is not in B1:B10 then C1:C10 will be checked. If found in this
range "Second One Found" will be the result. If A1 is found in neither range
then 0 will result.

In the future it is helpful if you post a small sample of data for what you
are trying to do.

--
If this helps, please remember to click yes.


"Pascale" wrote:

Hi,

I was wondering if it is possible to have if and research in the same formula?

I need to have a fomula that looks into a cell for a certain item described
in a list and if its not there to search into a second set of data . and if
its in either to right nothing for the moment, I may need to add more later.

Thank you for your help!


T. Valko

Help with a IF formula
 
IF(NOT(ISERROR(MATCH(A1,B1:B10,0)))

A few keystrokes shorter:

=IF(COUNT(MATCH(A1,B1:B10,0))

Or

=IF(ISNUMBER(MATCH(A1,B1:B10,0))

--
Biff
Microsoft Excel MVP


"Paul C" wrote in message
...
You can nest your conditions lke this

IF(Test for first value, return answer, IF(check for second value,return
answer,0))

=IF(NOT(ISERROR(MATCH(A1,B1:B10,0))),"First One
Found",IF(NOT(ISERROR(MATCH(A1,C1:C10,0))),"Second One Found",0))

In this sample If A1 is found in B1:B10 the formula will yield "First One
Found", If A1 is not in B1:B10 then C1:C10 will be checked. If found in
this
range "Second One Found" will be the result. If A1 is found in neither
range
then 0 will result.

In the future it is helpful if you post a small sample of data for what
you
are trying to do.

--
If this helps, please remember to click yes.


"Pascale" wrote:

Hi,

I was wondering if it is possible to have if and research in the same
formula?

I need to have a fomula that looks into a cell for a certain item
described
in a list and if its not there to search into a second set of data . and
if
its in either to right nothing for the moment, I may need to add more
later.

Thank you for your help!





All times are GMT +1. The time now is 05:35 PM.

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