![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
I'm having trouble with my validation formula. I'm wanting to check for duplicate invoices and I am using this formula:
=Countif($C$9,C9)=0 I have a range of cells (C9:C38) that I copied this formula to. My problem is that the validation only gives the error message if the new invoice is the same as in C9, I can put the same invoice number in cells C10:C38 and no error message. What's wrong? Thanks,
__________________
I appreciate the help from everyone at Mr. Excel. viper |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
|
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi viper
Try changing the Range argument of the COUNTIF to: $C$9:$C$38 |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
Aladin in cell C8 I have the heading, and Dave I changed the formula to $C$9:$C$38 but now I get the error message in each cell. I've done this before I just can't remember how or the formula I used.
__________________
I appreciate the help from everyone at Mr. Excel. viper |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Portland, OR USA
Posts: 1,374
|
You want the COUNTIF to equal 1, not 0.
Hope this helps! -Russell |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Jefferson City, Missouri
Posts: 383
|
Thanks to all,
I worked it out and it seems to be working as I need. Thanks,
__________________
I appreciate the help from everyone at Mr. Excel. viper |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
to be used in data validation that you set up in C9, which you copy/propagate down to relevant cells. Aladin |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|