Nathan Asius
New Member
- Joined
- Jan 15, 2024
- Messages
- 41
- Office Version
- 365
- Platform
- Windows
I'm looking to build a formula with a series of nested IF(AND statements where one of the two conditions in each IF statement looks for a certain portion of a text in a cell.
For example if A1 contains "44 White Birds", and A2 contains "Willow Tree" I need cell A10 to look for "44W" in A1, and "Willow" in A2 and return a range named 'BirdWillow'. So the formula is only looking for a portion of a text string (that may contain letters and numbers), in each cell.
I've tried the following formula and in testing it I receive the error of too many arguments.
=IF(AND(ISNUMBER(SEARCH("44W",A1))),ISNUMBER(SEARCH("Willow",A2)),WillowSpecies, IF(AND(ISNUMBER(SEARCH("22F",A3))),ISNUMBER(SEARCH("Maple",A4)),MapleSpecies, IF(AND(ISNUMBER(SEARCH("6 Bark",A5))),ISNUMBER(SEARCH("Elm",A6)),ElmSpecies, IF(A7="Books","Bookcase",""))
I've played around with the syntax trying to re-arrange the parenthesis but I am not successful. I don't know if it's the syntax or if the Functions are entirely wrong. On my worksheet I don't have the spacing between the IF. I only did that to display the two conditions of each IF(AND.
For example if A1 contains "44 White Birds", and A2 contains "Willow Tree" I need cell A10 to look for "44W" in A1, and "Willow" in A2 and return a range named 'BirdWillow'. So the formula is only looking for a portion of a text string (that may contain letters and numbers), in each cell.
I've tried the following formula and in testing it I receive the error of too many arguments.
=IF(AND(ISNUMBER(SEARCH("44W",A1))),ISNUMBER(SEARCH("Willow",A2)),WillowSpecies, IF(AND(ISNUMBER(SEARCH("22F",A3))),ISNUMBER(SEARCH("Maple",A4)),MapleSpecies, IF(AND(ISNUMBER(SEARCH("6 Bark",A5))),ISNUMBER(SEARCH("Elm",A6)),ElmSpecies, IF(A7="Books","Bookcase",""))
I've played around with the syntax trying to re-arrange the parenthesis but I am not successful. I don't know if it's the syntax or if the Functions are entirely wrong. On my worksheet I don't have the spacing between the IF. I only did that to display the two conditions of each IF(AND.