+ Reply to Thread
Results 1 to 3 of 3

Compare text with "<" or ">"

  1. #1
    Registered User
    Join Date
    09-17-2008
    Location
    Zurich
    Posts
    2

    Compare text with "<" or ">"

    Hi all,

    I have an issue comparing the text content of cells:
    the 2 adjacent cells A1 and B1 contain for example:
    1. VLSN[115.03]N[115.03]SDANLELINTWVAK
      VLSN[115.03]NSDANLELINTWVAK

    1) If you write in a cell:
    Please Login or Register  to view this content.
    => you get FALSE since "[" comes before "S" in the alpha sorting of excel.

    2) But if you do similar comparison in a VB macro:
    Please Login or Register  to view this content.
    => you get TRUE?!?

    I don't get it?!?
    Do someone has an explanation for that or am I doing something fundamentally wrong???

    Thanks in advance for your help and/or comments.
    Ludo
    Last edited by lgillet; 09-17-2008 at 07:10 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    Have a look in the help at the

    Option Compare Statement



    Sorry arthurbr missing the infractions post
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-17-2008
    Location
    Zurich
    Posts
    2

    solved, thanks :)

    Hi,

    the declaration (before the code of the module) of

    Please Login or Register  to view this content.
    solved my problem.

    Thanks a lot for the super-fast reply: your forum ROCKS!!
    (and sorry for the infraction about the code quoting).

    Ludo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Find row number of text string in a range of cells
    By Steven Fleck in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-06-2013, 08:38 PM
  2. Macro to compare text
    By Vikings10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2007, 09:23 PM
  3. Compare Text, Replace Number
    By sglick in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-11-2007, 05:04 PM
  4. Compare lists of text
    By stuarthill27 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-18-2007, 04:18 AM
  5. Excel to text, compare, text to excel
    By VishalkumarT in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-19-2007, 09:30 AM

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