Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Linda G
 
Posts: n/a
Default concatenate a text string if two different cells contain the sam.

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.

  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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,"")




In article ,
"Linda G" <Linda wrote:

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.

  #3   Report Post  
Linda G
 
Posts: n/a
Default

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?


"JE McGimpsey" wrote:

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,"")




In article ,
"Linda G" <Linda wrote:

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.


  #4   Report Post  
Linda G
 
Posts: n/a
Default

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?



"JE McGimpsey" wrote:

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,"")




In article ,
"Linda G" <Linda wrote:

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.


  #5   Report Post  
Linda G
 
Posts: n/a
Default

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?



"JE McGimpsey" wrote:

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,"")




In article ,
"Linda G" <Linda wrote:

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.




  #6   Report Post  
Linda G
 
Posts: n/a
Default

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

"JE McGimpsey" wrote:

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,"")




In article ,
"Linda G" <Linda wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i add the same text after current text in multiple cells Sue Excel Discussion (Misc queries) 3 January 13th 05 09:28 PM
Concatenate cells without specifying/writing cell address individually Hari Excel Discussion (Misc queries) 4 January 3rd 05 06:05 PM
Convert data of cells to any type: Number, Date&Time, Text Kevin Excel Discussion (Misc queries) 0 December 30th 04 06:55 AM
Need to convert text string to seperate cells Debbie Nuding Excel Worksheet Functions 2 December 6th 04 06:14 PM
Cells and and spaces after a string of text H Excel Worksheet Functions 2 November 19th 04 08:26 PM


All times are GMT +1. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"