Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want to insert an address into a merged cell depending on a location cell.
When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Use this.
=IF(E2=1,"ABC Company" & CHAR(10) & "123 Street" & CHAR(10) & "Anytown, StateZip","DEF Company" & CHAR(10) & "456 Road" & CHAR(10) & "Anytown, State Zip") You need to check the "wrap text" box in the cell alignment format. -- Yanick "Learner101b" wrote: I want to insert an address into a merged cell depending on a location cell. When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Works like a charm. Thank you very much.
Curiosity question: How did you know a 'return' was 'char' 10? Learner010b "Yanick" wrote: Use this. =IF(E2=1,"ABC Company" & CHAR(10) & "123 Street" & CHAR(10) & "Anytown, StateZip","DEF Company" & CHAR(10) & "456 Road" & CHAR(10) & "Anytown, State Zip") You need to check the "wrap text" box in the cell alignment format. -- Yanick "Learner101b" wrote: I want to insert an address into a merged cell depending on a location cell. When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I knew it for my C++ programming in DOS. ASCII code for line feed is 10.
Take a look there to have a list of all code http://www.asciitable.com/ I am sure you can have a lot of info on google if you search for ASCII. Have fun! -- Yanick "Learner101b" wrote: Works like a charm. Thank you very much. Curiosity question: How did you know a 'return' was 'char' 10? Learner010b "Yanick" wrote: Use this. =IF(E2=1,"ABC Company" & CHAR(10) & "123 Street" & CHAR(10) & "Anytown, StateZip","DEF Company" & CHAR(10) & "456 Road" & CHAR(10) & "Anytown, State Zip") You need to check the "wrap text" box in the cell alignment format. -- Yanick "Learner101b" wrote: I want to insert an address into a merged cell depending on a location cell. When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you for all of you help!
.. . . Learner101b "Yanick" wrote: I knew it for my C++ programming in DOS. ASCII code for line feed is 10. Take a look there to have a list of all code http://www.asciitable.com/ I am sure you can have a lot of info on google if you search for ASCII. Have fun! -- Yanick "Learner101b" wrote: Works like a charm. Thank you very much. Curiosity question: How did you know a 'return' was 'char' 10? Learner010b "Yanick" wrote: Use this. =IF(E2=1,"ABC Company" & CHAR(10) & "123 Street" & CHAR(10) & "Anytown, StateZip","DEF Company" & CHAR(10) & "456 Road" & CHAR(10) & "Anytown, State Zip") You need to check the "wrap text" box in the cell alignment format. -- Yanick "Learner101b" wrote: I want to insert an address into a merged cell depending on a location cell. When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
And you really used alt-enter instead of this literal <alt-enter, right?
Did you remember to turn on wraptext? Format|Cells|Alignment tab|check Wrap Text (xl2003 menus) And remember that merged cells don't react nicely to autofitting the rowheight. You'll have to adjust that manually. Learner101b wrote: I want to insert an address into a merged cell depending on a location cell. When I use the code below, Excel does not recognize the <alt enter. Any ideas? =IF(E2=1,"ABC Company<alt enter123 Street<alt enterAnytown, State Zip","DEF Company<alt enter456 Road<alt enterAnytown, State Zip") The <alt enter does not work in this text box, but I think you will understand what I want to do. Thanks for any help. Learner101b -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I place 3 lines of text (an address) in 1 cell? | New Users to Excel | |||
display 1 line of multiple worksheets into multiple lines on 1 wks | Excel Worksheet Functions | |||
Splitting comma separated lines of an address for mail merge. | Excel Discussion (Misc queries) | |||
Display multiple lines of text within a cell from multiple column. | Excel Worksheet Functions | |||
?? Extra blank lines in 'address' cell after exporting to Excel | Excel Discussion (Misc queries) |