SOLVED

# Using VLOOKUP to split a text string

Copper Contributor

# Using VLOOKUP to split a text string

I am using the formula =VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:W38,9,FALSE) which returns 7.52-14.01. My issue is I need to expand the formula so that it will return only characters to the left of "-" which could be either 2 or 5 numbers.

3 Replies
best response confirmed by Steve Weaver (Copper Contributor)
Solution

# Re: Using VLOOKUP to split a text string

With 365:

``=LET(result,VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE),TEXTBEFORE(result,"-"))``

Without 365:

``=LEFT(VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE),FIND("-",VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE))-1)``

# Re: Using VLOOKUP to split a text string

Thank you Patrick2788! :clapping_hands:

# Re: Using VLOOKUP to split a text string

You're welcome!
1 best response

Accepted Solutions
best response confirmed by Steve Weaver (Copper Contributor)
Solution

# Re: Using VLOOKUP to split a text string

With 365:

``=LET(result,VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE),TEXTBEFORE(result,"-"))``

Without 365:

``=LEFT(VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE),FIND("-",VLOOKUP(\$G3,'Quicken Portfolio'!\$B\$12:\$W\$38,9,FALSE))-1)``