ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   msgbox / inputbox etc (https://www.excelbanter.com/excel-programming/356062-msgbox-inputbox-etc.html)

samenvoegen van sheets

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...

Jim Cone

msgbox / inputbox etc
 
This is also posted in public.excel.misc


"samenvoegen van sheets"

wrote in message
...
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...

Tom Ogilvy

msgbox / inputbox etc
 
Just using formula you can't. You can put up a warning instead of a result

=if(countif(Sheet1!A:A,A1)1,"Possible
Duplicate",Vlookup(A1,Sheet1!A:F,3,False))

Otherwise you would need to write a macro to perform the lookups in a
sequential fashion. You would then have to run the macro .

This is possible, but you would need to provide details on locations and so
forth.

--
Regards,
Tom Ogilvy


"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...


samenvoegen van sheets

msgbox / inputbox etc
 
Hi Tom,

thks for your advise but the thing is that my Vlookup function is allready
in a macro cause my sheets are too big to do it manually. Zo i would like to
implement a msgbox (or an other box) in my Macro to warn me when there are
similaire names. And I would like that the message says something like
"attention there are two or more similare names, please choose the right one"
en then i would be able top choose the correct code.

do you think it is possible?

thks


"Tom Ogilvy" wrote:

Just using formula you can't. You can put up a warning instead of a result

=if(countif(Sheet1!A:A,A1)1,"Possible
Duplicate",Vlookup(A1,Sheet1!A:F,3,False))

Otherwise you would need to write a macro to perform the lookups in a
sequential fashion. You would then have to run the macro .

This is possible, but you would need to provide details on locations and so
forth.

--
Regards,
Tom Ogilvy


"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...


Tom Ogilvy

msgbox / inputbox etc
 
If you want to send me a small sample file with some of your data and code, I
can probably provide some sample code that would do this.



--
Regards,
Tom Ogilvy


"samenvoegen van sheets" wrote:

Hi Tom,

thks for your advise but the thing is that my Vlookup function is allready
in a macro cause my sheets are too big to do it manually. Zo i would like to
implement a msgbox (or an other box) in my Macro to warn me when there are
similaire names. And I would like that the message says something like
"attention there are two or more similare names, please choose the right one"
en then i would be able top choose the correct code.

do you think it is possible?

thks


"Tom Ogilvy" wrote:

Just using formula you can't. You can put up a warning instead of a result

=if(countif(Sheet1!A:A,A1)1,"Possible
Duplicate",Vlookup(A1,Sheet1!A:F,3,False))

Otherwise you would need to write a macro to perform the lookups in a
sequential fashion. You would then have to run the macro .

This is possible, but you would need to provide details on locations and so
forth.

--
Regards,
Tom Ogilvy


"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...


samenvoegen van sheets

msgbox / inputbox etc
 
Thks tom,
i suppose you want me to send it on your email.
So I will do so.

Thks a lot for helping me out.
flo

"Tom Ogilvy" wrote:

If you want to send me a small sample file with some of your data and code, I
can probably provide some sample code that would do this.



--
Regards,
Tom Ogilvy


"samenvoegen van sheets" wrote:

Hi Tom,

thks for your advise but the thing is that my Vlookup function is allready
in a macro cause my sheets are too big to do it manually. Zo i would like to
implement a msgbox (or an other box) in my Macro to warn me when there are
similaire names. And I would like that the message says something like
"attention there are two or more similare names, please choose the right one"
en then i would be able top choose the correct code.

do you think it is possible?

thks


"Tom Ogilvy" wrote:

Just using formula you can't. You can put up a warning instead of a result

=if(countif(Sheet1!A:A,A1)1,"Possible
Duplicate",Vlookup(A1,Sheet1!A:F,3,False))

Otherwise you would need to write a macro to perform the lookups in a
sequential fashion. You would then have to run the macro .

This is possible, but you would need to provide details on locations and so
forth.

--
Regards,
Tom Ogilvy


"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...


Tom Ogilvy

msgbox / inputbox etc
 
I got it. Will take a look at it an send it back.

--
Regards,
Tom Ogilvy



"samenvoegen van sheets" wrote:

Thks tom,
i suppose you want me to send it on your email.
So I will do so.

Thks a lot for helping me out.
flo

"Tom Ogilvy" wrote:

If you want to send me a small sample file with some of your data and code, I
can probably provide some sample code that would do this.



--
Regards,
Tom Ogilvy


"samenvoegen van sheets" wrote:

Hi Tom,

thks for your advise but the thing is that my Vlookup function is allready
in a macro cause my sheets are too big to do it manually. Zo i would like to
implement a msgbox (or an other box) in my Macro to warn me when there are
similaire names. And I would like that the message says something like
"attention there are two or more similare names, please choose the right one"
en then i would be able top choose the correct code.

do you think it is possible?

thks


"Tom Ogilvy" wrote:

Just using formula you can't. You can put up a warning instead of a result

=if(countif(Sheet1!A:A,A1)1,"Possible
Duplicate",Vlookup(A1,Sheet1!A:F,3,False))

Otherwise you would need to write a macro to perform the lookups in a
sequential fashion. You would then have to run the macro .

This is possible, but you would need to provide details on locations and so
forth.

--
Regards,
Tom Ogilvy


"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...



All times are GMT +1. The time now is 09:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com