+ Reply to Thread
Results 1 to 6 of 6

Address Block Problem

  1. #1
    Registered User
    Join Date
    12-15-2006
    Posts
    64

    Address Block Problem

    I use web robots to harvest contact information from public websites and from the HTML code on those sites. Those robots often return "address blocks" like the one below:

    "7 Gentlewind Pl
    Spring, TX 77381-6183
    (936) 273-6922"

    As you can see the address blocks contain, generally speaking, three rows of data. And, the rows are separated by a carriage return line feed.

    Now, I don't need to break this address block into its respective rows, although I'd like to know how Excel might do this for future reference. But what I do need to do is to display this data in a single cell linearly and in the cell height of only one row.

    Any idea how that might be done?

    I've tried Edit/Replace but I can't seem to get it to work as I can't copy paste the character for the line feed into the find field.

    LongFisher

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    If there is a hard CR (ie there's three lines of data in each cell) they're separated with the ASCII code 0010. You can use this in the find/replace dialog box:

    FInd ALT & 0010 (numberpad)
    Replace " "
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by longfisher
    I use web robots to harvest contact information from public websites and from the HTML code on those sites. Those robots often return "address blocks" like the one below:

    "7 Gentlewind Pl
    Spring, TX 77381-6183
    (936) 273-6922"

    As you can see the address blocks contain, generally speaking, three rows of data. And, the rows are separated by a carriage return line feed.

    Now, I don't need to break this address block into its respective rows, although I'd like to know how Excel might do this for future reference. But what I do need to do is to display this data in a single cell linearly and in the cell height of only one row.

    Any idea how that might be done?

    I've tried Edit/Replace but I can't seem to get it to work as I can't copy paste the character for the line feed into the find field.

    LongFisher
    If three rows of data are in single cell. You can uncheck the wrap text option to bring it to one line.
    Right click > Format Cells... > under Alignment tab uncheck the Wrap text option.

  4. #4
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,444
    If three rows of data are in single cell. You can uncheck the wrap text option to bring it to one line.
    Right click > Format Cells... > under Alignment tab uncheck the Wrap text option.
    This will only work until the cell is edited again. The presence of the ASCII 0010 character causes reversion.

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by sweep
    This will only work until the cell is edited again. The presence of the ASCII 0010 character causes reversion.
    If there would be a need to edit cells they can be by following way.

    press Ctrl+H
    in Find what: single space
    in Replace with: single space
    and press Replace All

  6. #6
    Registered User
    Join Date
    12-15-2006
    Posts
    64

    Wow! What an Elegant Solution.

    Just format the cells appropriately. You bet.

    No work. Just paste.

    What a terrific solution to a problem that's been plaguing me.

    Thanks,

    Longfisher

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1