Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Match or Lookup formula help please

Column A Column B Colum C

John John = return value of 1, if matches, else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John" matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Match or Lookup formula help please

Do you mean items that match *on the same row* or do you mean items that
match *anywhere* within the range?

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Column A Column B Colum C

John John = return value of 1, if matches, else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John" matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Match or Lookup formula help please

Hi,

I meant item matches 'anywhere' within the range. Thanks

"T. Valko" wrote:

Do you mean items that match *on the same row* or do you mean items that
match *anywhere* within the range?

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Column A Column B Colum C

John John = return value of 1, if matches, else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John" matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Match or Lookup formula help please

Try this:

=IF(COUNTIF(A$1:A$20,B1),1,2)

Copy to the end of data in column B. Adjust ranges to suit.

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Hi,

I meant item matches 'anywhere' within the range. Thanks

"T. Valko" wrote:

Do you mean items that match *on the same row* or do you mean items that
match *anywhere* within the range?

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Column A Column B Colum C

John John = return value of 1, if matches,
else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John"
matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Match or Lookup formula help please

Thank you very much. You've solved it.


"T. Valko" wrote:

Try this:

=IF(COUNTIF(A$1:A$20,B1),1,2)

Copy to the end of data in column B. Adjust ranges to suit.

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Hi,

I meant item matches 'anywhere' within the range. Thanks

"T. Valko" wrote:

Do you mean items that match *on the same row* or do you mean items that
match *anywhere* within the range?

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Column A Column B Colum C

John John = return value of 1, if matches,
else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John"
matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth










  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 411
Default Match or Lookup formula help please

Hi Soth,

If your list starts in A1, adjust $b$1:$b:$3 to accommodate the entire
list and past the formula below down column c?

=IF(ISERROR(MATCH(A1,$B$1:$B$3,FALSE)),2,MATCH(A1, $B$1:$B$3,FALSE))

Does this work for you?

Dan
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Match or Lookup formula help please

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Thank you very much. You've solved it.


"T. Valko" wrote:

Try this:

=IF(COUNTIF(A$1:A$20,B1),1,2)

Copy to the end of data in column B. Adjust ranges to suit.

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Hi,

I meant item matches 'anywhere' within the range. Thanks

"T. Valko" wrote:

Do you mean items that match *on the same row* or do you mean items
that
match *anywhere* within the range?

--
Biff
Microsoft Excel MVP


"Soth" wrote in message
...
Column A Column B Colum C

John John = return value of 1, if matches,
else 2
Smith Bob
Mary Jennifer

I like to have a formula in column C, if item in column A, "John"
matches
item in column B "John", then show value of #1, else, #2

Thank you,
Soth










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
Lookup & Match formula Danny Excel Worksheet Functions 3 October 4th 07 01:19 AM
Lookup/match formula? Fiona Excel Discussion (Misc queries) 7 August 25th 07 03:56 AM
LOOKUP, INDEX, MATCH (?) Formula PS Excel Worksheet Functions 0 June 13th 07 10:20 PM
Excel Lookup MATCH formula moglione1 Excel Discussion (Misc queries) 1 February 22nd 06 06:14 PM
lookup? Index? match? formula Richard Excel Discussion (Misc queries) 4 February 22nd 06 01:50 AM


All times are GMT +1. The time now is 08:01 AM.

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

About Us

"It's about Microsoft Excel"