Welcome to Forums Sign in | Join | Help | Forums
in Search


excel import file: deleting last '/n' from address line

Last post 11-05-2008 11:49 AM by Lee Harrison. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 11-05-2008 7:42 AM

    excel import file: deleting last '/n' from address line

    hi, i would like to find out how to delete the last '/n' from the address lines column. i added the '/n' when i concatenated various address columns. now i realise there's one too many '/n' as when viewing the address block via a constituent record there is a gap between the address line and the city.

    many thanks

    say

    Filed under:
  • 11-05-2008 7:58 AM In reply to

    • Lee Harrison
    • Top 100 Contributor
    • Posts 73
    • Organization: Breakthrough Breast Cancer
    • Products:  The Raiser's Edge

    Re: excel import file: deleting last '/n' from address line

    If you have an extra /n at the end of every single line then you can use the following formula in the cell to the right of the first row (assuming you're starting on A2):

    =LEFT(A2,LEN(A2)-2)

     That will copy the cell minus the last 2 characters. All you have to do then is drag that new cell down to the bottom of your last row.

    Don't forget to copy all of the new cells and then paste special, selecting values.

     

    Hope that makes sense!

    Lee

     

     

    Lee Harrison
    Breakthrough Breast Cancer
    London
  • 11-05-2008 10:02 AM In reply to

    • Mitchell Gibbs
    • Top 50 Contributor
    • User Since: 2000
    • Posts 127
    • Organization: Advocate Charitable Foundation
    • Products:  The Raiser's Edge, Sphere

    Re: excel import file: deleting last '/n' from address line

    You could also use the SUBSTITUTE function to catch any lingering instances.

    TRIM(SUBSTITUTE(A1,"/n"," ")) will replace /n with a space and then remove trailing spaces.

    Mitch

  • 11-05-2008 11:37 AM In reply to

    Re: excel import file: deleting last '/n' from address line

    thanks for the response. i've tried it but it takes the last character off when there is no /n

  • 11-05-2008 11:42 AM In reply to

    • Tony Lee
    • Not Ranked
    • User Since: 2005
    • Posts 15
    • Organization: SOS Children's Village - USA, Inc.
    • Products:  The Raiser's Edge

    Re: excel import file: deleting last '/n' from address line

    Can't you simply do a find and replace?  If there is one too many '/n' you could replace '/n/n' with just '/n'.

    Tony R. Lee
    Database Administrator
    SOS Childrens Villages-USA
  • 11-05-2008 11:49 AM In reply to

    • Lee Harrison
    • Top 100 Contributor
    • Posts 73
    • Organization: Breakthrough Breast Cancer
    • Products:  The Raiser's Edge

    Re: excel import file: deleting last '/n' from address line

    You could first of all use Auto Filter, and the choose Custom, and then select ends with /n. This should then filter out any rows that you don't want to change, then you could apply the formula.

     

    Lee Harrison
    Breakthrough Breast Cancer
    London
Page 1 of 1 (6 items)