zipotontic
New Member
- Joined
- Mar 11, 2023
- Messages
- 6
- Office Version
- 365
- Platform
- Windows
Hello!
I have an inventory list with products of various units of measure (box, each, spool, etc). If it is more than 1, the total number of units is included in parenthesis at the end of the item name. So, for example, if it is a spool of 100 feet, it will show (100FT) or, if it is a box of 50, it will show (50/bx), etc.
What I am trying to achieve is a column that lists only the numeric values found between the parenthesis.
So far I have written two different formulas that extract the string between the parenthesis. However, there are issues with each. Formula 1 extracts the entire string in between the parenthesis, I cannot figure out how to modify/add to this formula so that it will remove the text and leave only the number. Formula 2 is long and clunky but it does the trick more or less. The issue is it creates a lot of work for me because I have to make sure I scan an entire list of thousands of products to be sure I have included all units of measure (so far I have only found box, spool, each). Also, occasionally there will be an item with some other random bit of information in parenthesis not related to the unit of measure and my formula will end up displaying that.
Formula #1:
=IFERROR(MID(LEFT(A2,FIND(")",A2)-1),FIND("(",A2)+1,LEN(A2)),"")
Formula #2:
IF(D16="SPOOL",MID(LEFT(A16,FIND("FT)",A16)-1),FIND("(",A16)+1,LEN(A16)),IF(D16="BOX",MID(LEFT(A16,FIND("/BX)",A16)-1),FIND("(",A16)+1,LEN(A16)),IF((ISNUMBER(SEARCH(")",A16))),RIGHT(TEXTBEFORE(A16, ")"),3),"")))
Thanks so much for the help!
I have an inventory list with products of various units of measure (box, each, spool, etc). If it is more than 1, the total number of units is included in parenthesis at the end of the item name. So, for example, if it is a spool of 100 feet, it will show (100FT) or, if it is a box of 50, it will show (50/bx), etc.
What I am trying to achieve is a column that lists only the numeric values found between the parenthesis.
So far I have written two different formulas that extract the string between the parenthesis. However, there are issues with each. Formula 1 extracts the entire string in between the parenthesis, I cannot figure out how to modify/add to this formula so that it will remove the text and leave only the number. Formula 2 is long and clunky but it does the trick more or less. The issue is it creates a lot of work for me because I have to make sure I scan an entire list of thousands of products to be sure I have included all units of measure (so far I have only found box, spool, each). Also, occasionally there will be an item with some other random bit of information in parenthesis not related to the unit of measure and my formula will end up displaying that.
Formula #1:
=IFERROR(MID(LEFT(A2,FIND(")",A2)-1),FIND("(",A2)+1,LEN(A2)),"")
Formula #2:
IF(D16="SPOOL",MID(LEFT(A16,FIND("FT)",A16)-1),FIND("(",A16)+1,LEN(A16)),IF(D16="BOX",MID(LEFT(A16,FIND("/BX)",A16)-1),FIND("(",A16)+1,LEN(A16)),IF((ISNUMBER(SEARCH(")",A16))),RIGHT(TEXTBEFORE(A16, ")"),3),"")))
Thanks so much for the help!