Created
May 29, 2013 12:45
-
-
Save BDollar/5670015 to your computer and use it in GitHub Desktop.
Excel formula for subdividing a string in a cell and looking up the sections of the string in other worksheets.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'ItemNumber', 'Prefix' and 'Suffix' are named ranges. | |
=LEFT(C37,SEARCH(",",C37,1))&" "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,3,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,3,FALSE) | |
=LEFT(C37,SEARCH(",",C37,1))&" "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,3,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,3,FALSE) | |
=C366&" "&VLOOKUP(LEFT(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))-1),Prefix,3,FALSE)&" x "&VLOOKUP(MID(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))+1,100),Suffix,3,FALSE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment