gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
write excel formula to find "ACS" or "APD" or "WCS" with in text and show the same value
- User
write excel formula to find "ACS" or "APD" or "WCS" with in text and show the same value
- Assistant
To find the values "ACS", "APD", or "WCS" within a text string in Excel and display the found value, you can use the following formula:
=IF(ISNUMBER(SEARCH("ACS", A1)), "ACS", IF(ISNUMBER(SEARCH("APD", A1)), "APD", IF(ISNUMBER(SEARCH("WCS", A1)), "WCS", "Not Found")))In this formula:
- Replace
A1with the cell reference that contains the text you want to search. - The
SEARCHfunction looks for the specific text within the cell. ISNUMBERchecks ifSEARCHreturned a position (which indicates that the string was found).- The formula returns the first match it finds in the order of ACS, APD, and WCS. If none of these strings are found within the text, it returns "Not Found".
If you want to capture any occurrences and could have multiple values in a single cell, you might need to use a more complex formula or VBA code. However, the provided formula will effectively return the first match it finds.
- Replace