#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    1
    Rep Power
    0

    excel scripting??


    Hi,
    would it be possible say, if you had an excel file with 2 sheets, to loop around all the names in sheet 1, search search 2 for these names, and if a name is present in sheet 2, to tick a cell in sheet 1? for example:
    sheet 1 looks like:
    ID Name Address
    1 J Smith England
    2 B brown Wales
    ............................... and so on
    and sheet 2 is the same, could one write a program that searchs sheet2 and ticks a cell beside the name of J Smith, if he is in it?

    hope that makes sense,

    thanks

    V
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Location
    Melbourne, Australia
    Posts
    212
    Rep Power
    12
    Yes it is possible.
    You could also use a simple lookup function in the sheet.

    Code:
    i.e.
    =IF(LOOKUP(SheetOneName,SheetTwoNames)=SheetOneName,"tick","not there")
    Where SheetOneName is the range in Sheet One containing the names, and SheetTwoNames is the range in Sheet two.

    Hope this helps.

    To do it in VB, you'd have to use a "for" loop, which becomes a little more complicated.
    How can I soar like an eagle when
    I'm flying with turkey's?

IMN logo majestic logo threadwatch logo seochat tools logo