ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Column and cell identificatiion (https://www.excelbanter.com/excel-worksheet-functions/189926-column-cell-identificatiion.html)

Budask

Column and cell identificatiion
 
If cell value/number B2 is shown anywhere in column A, then how do I show that cell B2 in cell C2?

I have got as far as having the following in cell C2 =IF((B2=A2),B2) which works but only if the cell being looked for is in A2. When I try to extend column A to say A2:A100 so that can look in anywhere within that column, it no longer works.

Any assistance very much appreciated - thanks.

Budask

JE McGimpsey

Column and cell identificatiion
 
One way:

=IF(COUNTIF(A:A,B2) 0, B2, "Not Found")


In article ,
Budask wrote:

If cell value/number B2 is shown anywhere in column A, then how do I
show that cell B2 in cell C2?

I have got as far as having the following in cell C2 =IF((B2=A2),B2)
which works but only if the cell being looked for is in A2. When I try
to extend column A to say A2:A100 so that can look in anywhere within
that column, it no longer works.

Any assistance very much appreciated - thanks.

Budask


Rick Rothstein \(MVP - VB\)[_611_]

Column and cell identificatiion
 
Try this formula in C2 (the formula can be copied down if needed)...

=IF(ISNUMBER(MATCH(B2,A$2:A$100,0)),B2,"")

Rick


"Budask" wrote in message
...

If cell value/number B2 is shown anywhere in column A, then how do I
show that cell B2 in cell C2?

I have got as far as having the following in cell C2 =IF((B2=A2),B2)
which works but only if the cell being looked for is in A2. When I try
to extend column A to say A2:A100 so that can look in anywhere within
that column, it no longer works.

Any assistance very much appreciated - thanks.

Budask




--
Budask



Rick Rothstein \(MVP - VB\)[_612_]

Column and cell identificatiion
 
Actually, in thinking about it, and assuming your search word will never be
in your Row 1 header, you don't have to provide a limit on the search
range...

=IF(ISNUMBER(MATCH(B2,A:A,0)),B2,"")

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
Try this formula in C2 (the formula can be copied down if needed)...

=IF(ISNUMBER(MATCH(B2,A$2:A$100,0)),B2,"")

Rick


"Budask" wrote in message
...

If cell value/number B2 is shown anywhere in column A, then how do I
show that cell B2 in cell C2?

I have got as far as having the following in cell C2 =IF((B2=A2),B2)
which works but only if the cell being looked for is in A2. When I try
to extend column A to say A2:A100 so that can look in anywhere within
that column, it no longer works.

Any assistance very much appreciated - thanks.

Budask




--
Budask





All times are GMT +1. The time now is 01:52 PM.

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