Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 151
Default Help to pick string value if match happens

Hi

I have 2 ranges, for convenience i have copied in single sheet.
Range1 is a5:b2500 and Range2 is f5:h2500
now i want a function at c5
Like picking 2 words from a5 & b5 and
comparing all rows from f5:g2500, if they match then pick value in h cell
for example:
a5 = pink shiffon 20% woollen (2 words pink shiffon)
b5 = grand trunk textiles (2 words grand trunk)
match found at f200 & g200 with same words
then pick string at h200 "indent 2000 yards, in 4 sets......."
and place at c5
suppose you have 3 matches still pick the first match.
i need to copy the function from c5 thro c2500
i tried to use wmid() function but still not sure of my results
please help me.
if this not possible by function please give me macro, but I prefer function.
thanks in advance

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Help to pick string value if match happens

Saved from a previous post:

If you want exact matches for just two columns (and return a value from a
third), you could use:

=index(othersheet!$c$1:$c$100,
match(1,(a2=othersheet!$a$1:$a$100)
*(b2=othersheet!$b$1:$b$100),0))

(all in one cell)

This is an array formula. Hit ctrl-shift-enter instead of enter. If you do it
correctly, excel will wrap curly brackets {} around your formula. (don't type
them yourself.)

Adjust the range to match--but you can only use the whole column in xl2007.

This returns the value in othersheet column C when column A and B (of
othersheet) match A2 and B2 of the sheet with the formula.

And you can add more conditions by just adding more stuff to that product
portion of the formula:

=index(othersheet!$d$1:$d$100,
match(1,(a2=othersheet!$a$1:$a$100)
*(b2=othersheet!$b$1:$b$100)
*(c2=othersheet!$c$1:$c$100),0))

Eddy Stan wrote:

Hi

I have 2 ranges, for convenience i have copied in single sheet.
Range1 is a5:b2500 and Range2 is f5:h2500
now i want a function at c5
Like picking 2 words from a5 & b5 and
comparing all rows from f5:g2500, if they match then pick value in h cell
for example:
a5 = pink shiffon 20% woollen (2 words pink shiffon)
b5 = grand trunk textiles (2 words grand trunk)
match found at f200 & g200 with same words
then pick string at h200 "indent 2000 yards, in 4 sets......."
and place at c5
suppose you have 3 matches still pick the first match.
i need to copy the function from c5 thro c2500
i tried to use wmid() function but still not sure of my results
please help me.
if this not possible by function please give me macro, but I prefer function.
thanks in advance


--

Dave Peterson
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
How to count the match letter within a string? Eric Excel Discussion (Misc queries) 7 August 22nd 07 03:43 AM
Formula to Pick Out Characters within a Text String Peanut Excel Worksheet Functions 7 March 21st 07 10:08 PM
match number in a string of numbers cmoore Excel Discussion (Misc queries) 3 May 2nd 06 07:46 PM
Partial String Match Using VLOOKUP cdhmotes Excel Worksheet Functions 4 December 26th 05 10:26 PM
How to use AdvancedFilter wildcard to match end of string? bereid Excel Discussion (Misc queries) 2 November 29th 05 02:09 AM


All times are GMT +1. The time now is 07:01 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"