Forum Discussion
BCowans
Jul 14, 2023Copper Contributor
Formula Help
Hello everyone! I need help with what I imagine could be a simple formula but my brain is having a hard time figuring it out. I need a formula that auto-populates a text in another cell based on a...
- Jul 15, 2023
=IF(COUNT(SEARCH({"Dr.","NP","PA"},A1)),"MH")
Francisco_nitt
Jul 15, 2023Copper Contributor
To achieve this, you can use the following formula in cell B1:
=IF(OR(LEFT(A1, 3)="Dr.", LEFT(A1, 3)="NP ", LEFT(A1, 3)="PA "), "MH", "")
Here's how the formula works:
The LEFT function extracts the first three characters from cell A1.
The OR function checks if the extracted string is equal to "Dr.", "NP ", or "PA ".
If the condition is true, the formula returns "MH"; otherwise, it returns an empty string ("").
Make sure to apply this formula to cell B1 and drag it down to auto-populate the corresponding values for the subsequent rows based on the respective cell values in column A.
Hope this will help you.
=IF(OR(LEFT(A1, 3)="Dr.", LEFT(A1, 3)="NP ", LEFT(A1, 3)="PA "), "MH", "")
Here's how the formula works:
The LEFT function extracts the first three characters from cell A1.
The OR function checks if the extracted string is equal to "Dr.", "NP ", or "PA ".
If the condition is true, the formula returns "MH"; otherwise, it returns an empty string ("").
Make sure to apply this formula to cell B1 and drag it down to auto-populate the corresponding values for the subsequent rows based on the respective cell values in column A.
Hope this will help you.