chestnutgreen
New Member
- Joined
- Sep 13, 2023
- Messages
- 2
- Office Version
- 2016
- Platform
- MacOS
Hello This is my first post. I've been a longtime lurker and always found what I needed without posting. But this time I've searched for a long time and tried different formulas without success.
I am trying to construct a formula that will return certain text based on the text in two columns. Each column is to be matched with a different named range.
For example: A3 contains "apple" and B3 contains "pasta". I want a formula for C3 that determines if A3 is from range F2:F4 (a list of fruit), and B3 is from range H2:H3 (a list of carbs), return text "Dinner".
Separately I would specify if the A value is from the carb range and the B value is from the protein language, the returned C text is "Lunch".
I would do this for about six conditions (eg Breakfast, Lunch, Snack, Dinner, Dessert, Midnight). Each range might have 20+ items.
I can do a simple evaluation based on one column but I have been frustrated trying to get one cell to evaluate two columns.
This works for one column:
=IF(COUNTIF(Fruit,A3),"Dinner","")
Screenshot attached - I can't get the mini-sheet to work with my older version of Excel.
Any help would be most appreciated.
I am trying to construct a formula that will return certain text based on the text in two columns. Each column is to be matched with a different named range.
For example: A3 contains "apple" and B3 contains "pasta". I want a formula for C3 that determines if A3 is from range F2:F4 (a list of fruit), and B3 is from range H2:H3 (a list of carbs), return text "Dinner".
Separately I would specify if the A value is from the carb range and the B value is from the protein language, the returned C text is "Lunch".
I would do this for about six conditions (eg Breakfast, Lunch, Snack, Dinner, Dessert, Midnight). Each range might have 20+ items.
I can do a simple evaluation based on one column but I have been frustrated trying to get one cell to evaluate two columns.
This works for one column:
=IF(COUNTIF(Fruit,A3),"Dinner","")
Screenshot attached - I can't get the mini-sheet to work with my older version of Excel.
Any help would be most appreciated.