Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Combining Cell Contents

Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill


Thank you for your help.

Sincerely,

PaolaAndrea
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Combining Cell Contents

=a2&if(a2=b2,"",char(10)&b2)

Remember to change the format to wrap text.
(Format|Cells|alignment tab in xl2003)



PaolaAndrea wrote:

Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill

Thank you for your help.

Sincerely,

PaolaAndrea


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 168
Default Combining Cell Contents

=if(A2<B2,A2&char(10)&B2,A2)
be sure text wrapping is enabled
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"PaolaAndrea" wrote:

Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill


Thank you for your help.

Sincerely,

PaolaAndrea

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Combining Cell Contents

Thank you, that worked great.

"KC Rippstein" wrote:

=if(A2<B2,A2&char(10)&B2,A2)
be sure text wrapping is enabled
--
Please remember to indicate when the post is answered so others can benefit
from it later.


"PaolaAndrea" wrote:

Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill


Thank you for your help.

Sincerely,

PaolaAndrea

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,268
Default Combining Cell Contents

You need to turn on wrap text under formatcellsalignment and make sure the
row height fits 2 lines

=A1&CHAR(10)&B1



--


Regards,


Peo Sjoblom


"PaolaAndrea" wrote in message
...
Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine
them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill


Thank you for your help.

Sincerely,

PaolaAndrea





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 353
Default Combining Cell Contents

=IF(B4=C4,B4,B4&CHAR(10)&C4)
The cell containing the function must have wrap text turned on, or you will
still see it on one row, separated with [?].

"PaolaAndrea" wrote:

Good Morning:

I have two cells that contain address information, one is mailing and the
other is street address.

I want to create a formula to compare both cell and to let me know if the
address if the same, if the address is not the same I want to combine them.

I know that to combine a cell I use the formula:
=A2&B2

How do a enter a paragraph mark in between them? meaning how to lines
instead of one long address without breaks?

example:

A2 = 109 Vine Hill & B2 = 3023 Leight Avenue

Result:
109 Vine Hill
3023 Leight Avenue

NOT: 109 Vine Hill 3023 Leight Avenue

But if A2 and B2 are the same, I want to show the address only once.

Example:

A2 = 109 Vine Hill & B2 = 109 Vine Hill

Result:

109 Vine Hill

NOT: 109 Vine Hill 109 Vine Hill


Thank you for your help.

Sincerely,

PaolaAndrea

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
combining column contents ? Tim[_6_] Excel Discussion (Misc queries) 4 September 12th 07 02:28 PM
Combining Cell Contents Storm Excel Worksheet Functions 4 April 14th 07 04:42 AM
Combining Cell Contents - entire columns SV Excel Worksheet Functions 7 December 11th 06 11:30 PM
Combining cell contents when there is content to combine Richard Excel Discussion (Misc queries) 2 June 21st 06 07:30 PM
Combining Row Contents! via135 Excel Worksheet Functions 4 January 19th 06 05:35 PM


All times are GMT +1. The time now is 12:48 PM.

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

About Us

"It's about Microsoft Excel"