+ Reply to Thread
Results 1 to 7 of 7

problem highlighting row

  1. #1
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    problem highlighting row

    hello everyone...

    I'm using the code below to color every row where "MAIN" and string
    starting by "FFR0" coexist, but it doesn't work

    is there anything wrong with this code ?


    Please Login or Register  to view this content.
    please take a look at the attached file.

    thanks in advance for your help
    regards...
    Attached Files Attached Files
    Last edited by mehdoush; 06-25-2009 at 01:34 PM.

  2. #2
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: problem highlighting row

    Hi

    "MAIN" is 4 characters long not 5 and "FFR0*" is 5 characters long not 14 - hnece your problem. Try amending to:

    Please Login or Register  to view this content.
    I removed the * from the second comparison as I suspect you just want to know if the cell starts with FFR0?

    Richard
    Richard Schollar
    Microsoft MVP - Excel

  3. #3
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem highlighting row

    hey Richard,

    it works just fine , thanks a lot ...

    but when trying to test it on a text file it didn't work...

    below two attached files txt file, and excel file with button "OpenText"

    see plz
    Last edited by mehdoush; 06-25-2009 at 01:23 PM.

  4. #4
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem highlighting row

    attached files...
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem highlighting row

    i think i solved the problem it works properly thanks a lot ...

  6. #6
    Valued Forum Contributor Richard Schollar's Avatar
    Join Date
    05-23-2006
    Location
    Hampshire UK
    MS-Off Ver
    Excel 2002
    Posts
    1,264

    Re: problem highlighting row

    You are modifying the text file in your subsequent code and when you run the avertMain routine before the modification code, none of your rows actually have MAIN in column A and FFR0 in column D. So, you just need to change the order the macros are called in in the tst sub:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-20-2009
    Location
    La, CA
    MS-Off Ver
    Excel 2003
    Posts
    70

    Re: problem highlighting row

    thanks a lot Richard Schollar

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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