Solved: Excel if cell contains vlxp then put matching cell data in current cell

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

mariaa33

Thread Starter
Joined
Aug 7, 2008
Messages
164
In cell j, I have formula =IF(SUMPRODUCT(ISNUMBER(SEARCH("VLXP",K2:AB2))+0)>=1,"Yes","No") that returns yes or no if VLXP is contained in any cell K2 through AB2 and it works correctly. What I would really like to do is then put into cell j the entire matching cell content or if not found return n/a. Is there a way to accomplish this maybe with VBA?
 
Joined
Oct 20, 2004
Messages
7,837
I think you can replace your formula with this:
=IF(ISERROR(INDEX(K2:AB2,MATCH("*VLXP*",K2:AB2,0))),"n/a",INDEX(K2:AB2,MATCH("*VLXP*",K2:AB2,0)))
 
Joined
Oct 20, 2004
Messages
7,837
Let's make that easier to read:
Code:
=IF(ISERROR(INDEX(K2:AB2,MATCH("*VLXP*",K2:AB2,0))),"n/a",INDEX(K2:AB2,MATCH("*VLXP*",K2:AB2,0)))
 

mariaa33

Thread Starter
Joined
Aug 7, 2008
Messages
164
Slurpee55, you are awesome! I have tried so many different combos of match and index with no luck. Thank you.
 
Joined
Oct 20, 2004
Messages
7,837
Your formula was pretty interesting because of some of the tricks you pulled on Excel - actually more complex than the Index/Match!
But very glad to help. :)
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top