concatenate a text string if two different cells contain the sam.

L

Linda G

I am working with database files where the primary first name, secondary
first name and primary last name and secondary last name are in separate
columns.

What I need is a formula the will concatenate the Primary first and Primary
last with an "&" sign inbetween if the primary last and the secondary last
are the same or the cell is blank.
 
J

JE McGimpsey

Assuming the the primary first name is column A, secondary first name in
column B, primary last name in column C, secondary last name in column
D, and further assuming that by "the cell" you mean the secondary last
name:

E1: =IF(OR(C1=D1,D1=""),A1 & "&" & C1,"")
 
L

Linda G

Thanks! That was great, now can we add another variable to say if the
Secondary Last Name is different that we combine the Primary First and
Primary First with an & sign and the Secondary First Name into one cell?
 
L

Linda G

I made a mistake in my reply.

Thanks! That was great, now can we add another variable to say if the
Secondary Last Name is different that we combine the Primary First and
Primary Second with an & sign and the Secondary First Name into one cell?
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top