+ Reply to Thread
Results 1 to 4 of 4

Compare text in a cell with the text in the previous cell and return a value

  1. #1
    Registered User
    Join Date
    11-08-2010
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Compare text in a cell with the text in the previous cell and return a value

    Hi
    I am looking for macro code or excel function to compare text in a cell (A2) with the text in the previous cell (A1) and return a percentage of differences in B2, and a value of text in C2
    Eg.
    A1: Atlantic Ocean B1: 100% C1: New
    A2: Ocean B2: -46.67% C2: Deletion
    A3: Atlantic Ocean B3: +46.67% C3: Addition
    A4: Pacific Ocean B4: -46.67% C4: Modification

    Please help me.

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Compare text in a cell with the text in the previous cell and return a value

    Hi

    How was that percentage calculated?

    rylo

  3. #3
    Registered User
    Join Date
    11-08-2010
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Compare text in a cell with the text in the previous cell and return a value

    The percentage is just an example. The formula I am seeking should be able to calculate it.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Compare text in a cell with the text in the previous cell and return a value

    I think the question was more: why 46.67% ?

    You really need to outline the rules governing comparison:

    - are you interested in words only ?

    - are there rules regards repetition ? (New York and New York New York - same or different ?)

    - are the positions of the words relevant ? (Car Park and Park Car - same or different ?)

    - is case significant ?
    Provide a multitude of examples... there are plenty of UDFs out there that do this type of thing but they will vary slightly given the above requirements.

+ 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