Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Finding duplicates in list during UserForm entry process

I'm designing a userform to be usee to add new records to a worksheet.

The user enters will enter the PO# in the userform in the 1st box. What
I would like to know, is there any coding I can include that will cause
that PO# entered by the user to be matched against all the PO numbers
already on the list? If so, I'll have a message box come up, telling
the user how to handle the duplicate.

Ideally, before the user goes on to the 2nd box in the userform, I
would like the check to be made if there is a duplicate.

The range name of the header for the PO number column is
"PO_OfficialList".

I'm sure this would work better if we were maintaining this list in
Access, but that isn't possible here at this time. I'm the only person
here in this dept that has Access.

So, can what I described be done with VBA coding?

Thanks,
J.O.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Finding duplicates in list during UserForm entry process

with worksheets("sheet1")
if application.countif(.range("e:e"),mypovariable) 0 then
msgbox "already there
else
'ok to add
end if
end with

is one way.

excelnut1954 wrote:

I'm designing a userform to be usee to add new records to a worksheet.

The user enters will enter the PO# in the userform in the 1st box. What
I would like to know, is there any coding I can include that will cause
that PO# entered by the user to be matched against all the PO numbers
already on the list? If so, I'll have a message box come up, telling
the user how to handle the duplicate.

Ideally, before the user goes on to the 2nd box in the userform, I
would like the check to be made if there is a duplicate.

The range name of the header for the PO number column is
"PO_OfficialList".

I'm sure this would work better if we were maintaining this list in
Access, but that isn't possible here at this time. I'm the only person
here in this dept that has Access.

So, can what I described be done with VBA coding?

Thanks,
J.O.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Finding duplicates in list during UserForm entry process

Thanks for replying. A few questions about this.
I'll replace "sheet1" with the actual sheet name. I understand that.

Not sure about the 2nd line. Is the dot in front of range as in
(.range is this correct?
Also, what would mypovariable stand for? Would I replace this, too?
Not sure if all the components of this line are literal, or if I'm to
replace any of this.
Would the (e:e") part be replaced with the column letter I want it to
look at?

Thanks for your time.
J.O.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding duplicates needitquick Excel Discussion (Misc queries) 3 June 11th 09 10:17 PM
LIST ENTRY ENABLE DROP DOWN LIST TO ACCEPT MORE THAN 1 ENTRY Frank Excel Discussion (Misc queries) 2 September 18th 08 10:31 PM
Finding Duplicates Karen Excel Discussion (Misc queries) 4 April 7th 08 10:47 PM
Finding duplicates Ted Metro Excel Worksheet Functions 2 November 21st 05 07:09 PM
Finding Duplicates fluffy Excel Worksheet Functions 2 September 16th 05 03:07 PM


All times are GMT +1. The time now is 05:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"