#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formula

Hi,

I have an excel sheet where column A is numbers and B is text.

Is there a formula I can use to search column B for a specific text
and then return the the number in column A?

Ie, I want to search in all of column B whether any of the cells says
'yes' for example and return the A cell besides it. So if cell B2 is
'yes' then I want to return cell A2.

Is there a way of doing this?

Many thanks.

Shilps
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Formula

Shilps,

=INDEX(A:A,MATCH("Yes",B:B,FALSE))

HTH,
Bernie
MS Excel MVP


"Shilps" wrote in message
...
Hi,

I have an excel sheet where column A is numbers and B is text.

Is there a formula I can use to search column B for a specific text
and then return the the number in column A?

Ie, I want to search in all of column B whether any of the cells says
'yes' for example and return the A cell besides it. So if cell B2 is
'yes' then I want to return cell A2.

Is there a way of doing this?

Many thanks.

Shilps



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Formula

Thanks for trying to help me out Bernie, but it doesn't seem to work.
I get N/A.

Anyone else have a suggestion?

On 28 Apr, 14:37, "Bernie Deitrick" <deitbe @ consumer dot org wrote:
Shilps,

=INDEX(A:A,MATCH("Yes",B:B,FALSE))

HTH,
Bernie
MS Excel MVP

"Shilps" wrote in message

...

Hi,


I have an excel sheet where column A is numbers and B is text.


Is there a formula I can use to search column B for a specific text
and then return the the number in column A?


Ie, I want to search in all of column B whether any of the cells says
'yes' for example and return the A cell besides it. So if cell B2 is
'yes' then I want to return cell A2.


Is there a way of doing this?


Many thanks.


Shilps

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Formula

As a test, try

=INDEX(A:A,MATCH(XXXX,B:B,FALSE))

replacing the XXXX with the address of any filled-in cell in column B. Then the formula should
return the value from the same row in column A (If the value in B is unique, that is).

It is possible that your "yes" value is actually " yes" (with a leading space) or "yes " (with a
trailing space)....

HTH,
Bernie
MS Excel MVP


"Shilps" wrote in message
...
Thanks for trying to help me out Bernie, but it doesn't seem to work.
I get N/A.

Anyone else have a suggestion?

On 28 Apr, 14:37, "Bernie Deitrick" <deitbe @ consumer dot org wrote:
Shilps,

=INDEX(A:A,MATCH("Yes",B:B,FALSE))

HTH,
Bernie
MS Excel MVP

"Shilps" wrote in message

...

Hi,


I have an excel sheet where column A is numbers and B is text.


Is there a formula I can use to search column B for a specific text
and then return the the number in column A?


Ie, I want to search in all of column B whether any of the cells says
'yes' for example and return the A cell besides it. So if cell B2 is
'yes' then I want to return cell A2.


Is there a way of doing this?


Many thanks.


Shilps



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,393
Default Formula

In A1:A5 I have numbers 5,9,12,15,18
In B1:B5 I have names of animals: monkey, dog, cat , cow, horse
In D1 I typed the word cow
In E1 I have =INDEX(A1:A5,MATCH(D1,B1:B5,0))
It returns the value 15
Best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Shilps" wrote in message
...
Hi,

I have an excel sheet where column A is numbers and B is text.

Is there a formula I can use to search column B for a specific text
and then return the the number in column A?

Ie, I want to search in all of column B whether any of the cells says
'yes' for example and return the A cell besides it. So if cell B2 is
'yes' then I want to return cell A2.

Is there a way of doing this?

Many thanks.

Shilps





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Regression Leverage Formula (Jerry W. Lewis or Mike Middleton)already have DFITS formula PJ[_3_] Excel Worksheet Functions 2 June 2nd 10 03:45 PM
copy formula down a column and have cell references change within formula brad New Users to Excel 5 May 13th 07 04:38 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
Cell doesn't show formula result - it shows formula (CTRL + ' doe. o0o0o0o Excel Worksheet Functions 6 November 19th 04 03:13 PM
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"