+ Reply to Thread
Results 1 to 3 of 3

msgbox / inputbox etc

  1. #1
    samenvoegen van sheets
    Guest

    msgbox / inputbox etc

    Hi,

    I'm using a vlookup formule to translate names into codes in a really big
    excel sheet.
    The problem is that if there are two time the same name, the system will
    take the first code to translate the name without warning me. It can happens
    that the system choose then for the wrong code.

    Therefore, i would like to use a msgbox or inputbox to warn me that there
    are two or more same names and to let me choose directly between the
    different codes.

    Is it possible ?? en if yes how can i do that?


    thanks a lot for any help...

  2. #2
    Dave Peterson
    Guest

    Re: msgbox / inputbox etc

    Are you using formulas for your =vlookup()?

    If yes, maybe you could add a check to your formula:

    =vlookup(a1,sheet2!a:b,2,false)
    would become:
    =if(countif(sheet2!a:a,a1)>1,"Duplicates",vlookup(a1,sheet2!a:b,2,false))

    or even:

    =if(countif(sheet2!a:a,a1)<>1,"Duplicates or missing",
    vlookup(a1,sheet2!a:b,2,false))
    (one cell)


    samenvoegen van sheets wrote:
    >
    > Hi,
    >
    > I'm using a vlookup formule to translate names into codes in a really big
    > excel sheet.
    > The problem is that if there are two time the same name, the system will
    > take the first code to translate the name without warning me. It can happens
    > that the system choose then for the wrong code.
    >
    > Therefore, i would like to use a msgbox or inputbox to warn me that there
    > are two or more same names and to let me choose directly between the
    > different codes.
    >
    > Is it possible ?? en if yes how can i do that?
    >
    > thanks a lot for any help...


    --

    Dave Peterson

  3. #3
    samenvoegen van sheets
    Guest

    Re: msgbox / inputbox etc

    thks a lot for you proposition

    have a nice day

    "Dave Peterson" wrote:

    > Are you using formulas for your =vlookup()?
    >
    > If yes, maybe you could add a check to your formula:
    >
    > =vlookup(a1,sheet2!a:b,2,false)
    > would become:
    > =if(countif(sheet2!a:a,a1)>1,"Duplicates",vlookup(a1,sheet2!a:b,2,false))
    >
    > or even:
    >
    > =if(countif(sheet2!a:a,a1)<>1,"Duplicates or missing",
    > vlookup(a1,sheet2!a:b,2,false))
    > (one cell)
    >
    >
    > samenvoegen van sheets wrote:
    > >
    > > Hi,
    > >
    > > I'm using a vlookup formule to translate names into codes in a really big
    > > excel sheet.
    > > The problem is that if there are two time the same name, the system will
    > > take the first code to translate the name without warning me. It can happens
    > > that the system choose then for the wrong code.
    > >
    > > Therefore, i would like to use a msgbox or inputbox to warn me that there
    > > are two or more same names and to let me choose directly between the
    > > different codes.
    > >
    > > Is it possible ?? en if yes how can i do that?
    > >
    > > thanks a lot for any help...

    >
    > --
    >
    > Dave Peterson
    >


+ 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