Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Returning Value Based on Two Different Ranges

Hello,
I have an issue that my INDEX MATCH function can't seem to work out.

Column A (A1:A100) is a list of Names. The names can repeat.

Column B (B1:B100) is a list of Locations. The names can repeat.

Column C (C1:C100) is a list of Phone Numbers.


I am trying to create a formula that will return the result in column C (Phone number) based on the values in columns A and B

e.g. If I search for the name "John" and the Location "New York", and it finds both the name John in A50 AND New York in B50, it will return the phone number in C50

Hopefully this makes sense.
I can't get INDEX MATCH to work so I think this is above my skillset. Any feedback helps. Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Returning Value Based on Two Different Ranges

Hi,

Am Mon, 16 Mar 2015 10:54:51 -0700 (PDT) schrieb cardan:

Column A (A1:A100) is a list of Names. The names can repeat.

Column B (B1:B100) is a list of Locations. The names can repeat.

Column C (C1:C100) is a list of Phone Numbers.

I am trying to create a formula that will return the result in column C (Phone number) based on the values in columns A and B

e.g. If I search for the name "John" and the Location "New York", and it finds both the name John in A50 AND New York in B50, it will return the phone number in C50


try:
=INDEX(C:C,MATCH("John"&"New York",A1:A100&B1:B100,0))
and insert the array formula with CTRL+Shift+Enter


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Returning Value Based on Two Different Ranges

That worked!
1. I didn't know you could join ranges like that and,
2. I totally spaced on the array function.

Thank You Claus!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Returning Value Based on Two Different Ranges

Hi,

Am Mon, 16 Mar 2015 11:13:26 -0700 (PDT) schrieb cardan:

1. I didn't know you could join ranges like that and,


if you have numbers in the columns you must add another sign, because
31&5 is the same string as 3&15.
So you have to change the formula for example to:
=INDEX(C:C,MATCH(31&"*"&5,A1:A100&"*"&B1:B100,0))


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Returning Value Based on Two Different Ranges

Very good to know. Thanks again.

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
returning a value in a table referencing ranges tveith Excel Worksheet Functions 2 May 23rd 10 07:33 AM
Returning the average of two ranges with a macro SunshineStateBroker via OfficeKB.com Excel Programming 3 October 21st 09 04:31 PM
union of named ranges based only on the names of those ranges sloth Excel Programming 3 October 2nd 06 03:18 AM
VLOOKUP function returning data from ranges rayteach Excel Worksheet Functions 5 October 1st 06 01:47 AM
Returning ranges from xll Ed[_11_] Excel Programming 0 September 4th 03 08:35 PM


All times are GMT +1. The time now is 04:12 PM.

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"