+ Reply to Thread
Results 1 to 5 of 5

VBA compare with more than one result

  1. #1
    Registered User
    Join Date
    09-15-2004
    Posts
    10

    VBA compare with more than one result

    i am really just beginning VBA after spending alot of time manipulating it. My problem today, I would hope, is an easy solve.


    I am trying to get a compare of the data in column A to do two (or more) things. For now, it is color the cell and a couple to the right and the 2nd part would be to add a category description. The first part is working fine - the part with the color fill. Anytime the case sensitive string ABC is entered, cells in columns A,B,C & D fill green.

    It is getting the compare to put the client category in that is not working. Below, is the part that is working.

    Ideally the D column cell return a category code, like "cli" for client when ABCxxxx is entered.


    _____A________B_________C________D____
    1 | abc123 (fill grn) (fill grn) cli
    2 | def213 - - -
    3 | abc599 (fill grn) (fill grn) cli


    I have tried a bunch of stuff, but I am just hacking at it. Anybody care to assist?

    thanks

    Joe


    Here is the Green Fill code.
    ##############################
    Please Login or Register  to view this content.
    ##############################


    [/FONT][/FONT]
    [/SIZE]
    Last edited by josephrowan; 08-26-2007 at 03:52 AM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    I don't follow, where is the client category?
    Last edited by StephenR; 08-26-2007 at 07:38 AM.

  3. #3
    Registered User
    Join Date
    09-15-2004
    Posts
    10

    clarification

    abc is the client, 123 is the job. The "cli" is a shortening to assist in creating a new UID based on. Later in the process, I need to be able to filter similar tasks from different clients.

    There are other categories for postage, mailing, design and such, but it will all follow the same rule in the end. All tolled, there are 11 different sub-categories

    does that help? Sorry for not being clear enough.

    J-

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Try this. which assumes client code is three characters. Btw Select Case is case-sensitive.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-15-2004
    Posts
    10

    Smile Success!

    Well done! The only change I made was to the line
    -- r.Offset(0, 3) = "cli" <-instead of left()

    But you got it to work and I thank you.

+ 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