Hi all,
I'm not sure if I'm taking the correct approach with this one but thought my best option would be an IF statement but not sure on the finer points of Excel and it allowing me to do this.
I have two columns where I would like to pull my data and a third column where I would like the result:
Column A and B are firstnames and surnames separated by a comma with no space and will always be different
So I'm trying an IF statement to calculate for each "value" (Firstname Surname) that the formula will create a generic output (in this case "columna" or "columnb", depending on which column the data is in) and replace the values or full names with that column specific generic name.
However I do not know how to build out my formula to include every "value" separated by a comma basically.
So whilst this is my foundation =IF(A2="", "","columna") I'm unsure how to include the range of values and also the best way to include Column B into the mix. The below seems to work at least for one value so I get "columna,columnb" but not sure if this is the most efficient way to do so.
=IF(A2="", "","columna")&IF(B2="", "","columnb")
Any help is appreciated.
I'm not sure if I'm taking the correct approach with this one but thought my best option would be an IF statement but not sure on the finer points of Excel and it allowing me to do this.
I have two columns where I would like to pull my data and a third column where I would like the result:
Column A | Column B | Column C |
John Doe,Jane Doe,John Smith | Paul Smith,James Patrick Smith | columna,columna,columna,columnb,columnb |
Column A and B are firstnames and surnames separated by a comma with no space and will always be different
So I'm trying an IF statement to calculate for each "value" (Firstname Surname) that the formula will create a generic output (in this case "columna" or "columnb", depending on which column the data is in) and replace the values or full names with that column specific generic name.
However I do not know how to build out my formula to include every "value" separated by a comma basically.
So whilst this is my foundation =IF(A2="", "","columna") I'm unsure how to include the range of values and also the best way to include Column B into the mix. The below seems to work at least for one value so I get "columna,columnb" but not sure if this is the most efficient way to do so.
=IF(A2="", "","columna")&IF(B2="", "","columnb")
Any help is appreciated.
Last edited: