Consulting

Results 1 to 6 of 6

Thread: Solved: Find multiple values in range

  1. #1
    VBAX Regular
    Joined
    May 2008
    Posts
    42
    Location

    Solved: Find multiple values in range

    I need to find codes like ?ach?, ?vim?, ?rck? etc in Reference column (Column B). If found any of the above codes then paste that code (vim or ach or rck) in next column(Column C).
    For instance:

    B2 contains ?07-08/1429/vim/rsh/sub? so vim needs to be pasted in C2. In case if none of the code found then in column C it will display ?Not found?.

    Sample data and output is attached.

    Regards,
    Johny

  2. #2
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi Johny,

    Take a look.
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You can do it without VBA

    =IF(SUM(COUNTIF(B2,{"*ach*","*rck*","*vim*"}))=0,"",INDEX({"ach","rck","vim "},MATCH(1,COUNTIF(B2,{"*ach*","*rck*","*vim*"}),0)))
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  4. #4
    VBAX Regular
    Joined
    May 2008
    Posts
    42
    Location
    Thanks a lot rbrhodes and xld,

    Both ways it solves the issue. Thanks a lot .

    Regards,
    Johny

  5. #5
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    2
    Location
    can't see solution in posted spreadsheet

  6. #6
    VBAX Newbie
    Joined
    Nov 2008
    Posts
    2
    Location
    sorry, got it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •