Forum Discussion
If statements with multiple conditions
- Jan 30, 2021
If you have the flexibility to name cities with the same abbreviation that is in your header, then it's a fairly simple formula: =IFERROR(IF(FIND(G$2,$F3)>0,"X"),"")
That formula can be copied to every cell in that table and work. But it works when the values in the cell in column F look like this, not when you have the abbreviation in the heading (BOS) but the full name spelled out ("Boston") in the cell being evaluated.
OR you could spell the name out fully in each case and that too would work. What you need is consistency.
You and I with our more flexible brains are able to know DFW means Dallas/Fort Worth, and a formula could be written to let Excel recognize it as well, or perhaps a table created to for the formula to refer to.
I guess the question to you is how super sophisticated (i.e., flexible) you want the solution to be.
If you have the flexibility to name cities with the same abbreviation that is in your header, then it's a fairly simple formula: =IFERROR(IF(FIND(G$2,$F3)>0,"X"),"")
That formula can be copied to every cell in that table and work. But it works when the values in the cell in column F look like this, not when you have the abbreviation in the heading (BOS) but the full name spelled out ("Boston") in the cell being evaluated.
OR you could spell the name out fully in each case and that too would work. What you need is consistency.
You and I with our more flexible brains are able to know DFW means Dallas/Fort Worth, and a formula could be written to let Excel recognize it as well, or perhaps a table created to for the formula to refer to.
I guess the question to you is how super sophisticated (i.e., flexible) you want the solution to be.
- GlynWilliamsJan 30, 2021Copper Contributor
mathetes You rock!
- Riny_van_EekelenJan 30, 2021Platinum Contributor
mathetes Minds alike 🙂