Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With your help I have now managed to produce a really useful spreadshee
but I am being driven nuts by my inability to finish the final part! Along with a bunch of other stuff my code creates a random number. I have managed to find the next available cell in column A on a give spreadsheet and place the number there. What I want to do before entering the number is check that it doesn' already exist somewhere in that column. If it is already present I wan to loop until a unique one is found. I have no doubt that this is really easy but I am just too dumb.....! Thanks for your help -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
see: http://www.cpearson.com/excel/NoDupEntry.htm -- Regards Frank Kabel Frankfurt, Germany With your help I have now managed to produce a really useful spreadsheet but I am being driven nuts by my inability to finish the final part! Along with a bunch of other stuff my code creates a random number. I have managed to find the next available cell in column A on a given spreadsheet and place the number there. What I want to do before entering the number is check that it doesn't already exist somewhere in that column. If it is already present I want to loop until a unique one is found. I have no doubt that this is really easy but I am just too dumb.....! Thanks for your help. --- Message posted from http://www.ExcelForum.com/ |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
....sorry to be such a newbie here.
I have read the link, how do I use COUNTIF within my VB? This seems to be a function within excel, I'm not sure how to access i within the code. Thanks -- Message posted from http://www.ExcelForum.com |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
...worked it out guys.
Private Sub CommandButton1_Click() With Worksheets("Sheet1").Columns("A:A") Do rand = Rnd() Set oCell = .Find(rand) Loop Until oCell Is Nothing Worksheets("Sheet1").Range("a1").Value = rand End With End Su -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
check for duplicates | Excel Discussion (Misc queries) | |||
Check for duplicates? | Excel Worksheet Functions | |||
check for duplicates | Excel Worksheet Functions | |||
Check for Duplicates | Excel Worksheet Functions | |||
Check for duplicates | Excel Worksheet Functions |