View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Learner101b Learner101b is offline
external usenet poster
 
Posts: 16
Default Multiple address lines in an 'if'

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