Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unique Macro
Hi All
I am totally new to excel programming, having never needed to use it before. I do however have some experience with visual basic. I have a really simple spreadsheet, which basically consists of 5 columns. It is used to record what items our A&P team has send to validation. Columns are laid out as such: Description Item-No Inv-Cost PO-Cost Date What I want to do, is impliment some sort of way, so that the same item number can't be entered in the Item-No column more than once. Would it be suitable to use a macro to do this? As I know it would involve looping around the existing data checking for a match. Or would it be better to impliment it as a database function? Thanks in advance, and sorry if this isnt detailed enough, I'm rushing it through to get to my coffee break. Thanks Mick |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Unique Macro
Hi
No need for code here - you can use data validation for this. When your item numbers start from B2, then select the range p.e. B2:B10000, select from menu Data.Validation, set Allow to Custom and enter the custom formula =(COUNTIF($B$2:$B2,$B2)<2) It's all you need, but you can also edit input message and/or error alert, when you want. -- Arvi Laanemets (When sending e-mail, use address arvil<Attarkon.ee) "Materialised[Work]" wrote in message om... Hi All I am totally new to excel programming, having never needed to use it before. I do however have some experience with visual basic. I have a really simple spreadsheet, which basically consists of 5 columns. It is used to record what items our A&P team has send to validation. Columns are laid out as such: Description Item-No Inv-Cost PO-Cost Date What I want to do, is impliment some sort of way, so that the same item number can't be entered in the Item-No column more than once. Would it be suitable to use a macro to do this? As I know it would involve looping around the existing data checking for a match. Or would it be better to impliment it as a database function? Thanks in advance, and sorry if this isnt detailed enough, I'm rushing it through to get to my coffee break. Thanks Mick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unique print macro question | Excel Discussion (Misc queries) | |||
Problem with my Unique Number Macro...Help? | Excel Programming | |||
Unique Identifier Macro | Excel Programming | |||
macro to sub total a unique cell value | Excel Programming | |||
Automatically generate a unique file name via macro... | Excel Programming |