solving countifs function working in cell failing in validation

elzein

New Member
Joined
Mar 5, 2023
Messages
3
Office Version
  1. 2010
Platform
  1. Windows
Hi every one
i am working in column validation validation to avoid duplicates
the countifs formula worked fine in cell
I am using table. and 3 count ifs
the logic, if task no is the same and resource wbs is steel the resource type can not accept duplicated type of steel
but when pasting it inside validation
it gave me an error
please help me to fix it thank you


the formula
=COUNTIFS([Resourse WBS],"Steel",[Task ID],[@[Task ID]],[Resource Type],[@[Resource Type]])<=1
 

Attachments

  • book1.png
    book1.png
    10.9 KB · Views: 6

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi & welcome to MrExcel.
You cannot use structured references in data validation, so you need to change them to normal ranges.
 
Upvote 0
Solution
Try this in the Resource Type column Data Validation. Check the table name

elzein.xlsm
ABC
1Task IDResourse WBSResource Type
26SteelSTEEL P 16
36SteelSTEEL P 17
46Material
56Equipment
66Labour
76Labour
86Steelvx
96Steelvxy
Sheet1
Cells with Data Validation
CellAllowCriteria
C2:C9Custom=COUNTIFS(INDIRECT("Table1[Resourse WBS]"),"Steel",INDIRECT("Table1[Task ID]"),INDIRECT("Table1[@[Task ID]]"),INDIRECT("Table1[Resource Type]"),INDIRECT("Table1[@[Resource Type]]"))=1
 
Upvote 0
COUNTIFS(INDIRECT("Table1[Resourse WBS]"),"Steel",INDIRECT("Table1[Task ID]"),INDIRECT("Table1[@[Task ID]]"),INDIRECT("Table1[Resource Type]"),INDIRECT("Table1[@[Resource Type]]"))=1
thanks for help sorry for late reply , i was trying hard to figure it out and i am stuck
i will feed back after check
 
Upvote 0
the validation formula was accepted, but any input in cell was rejected
i will simplify the need
i have 2 sheets for products, 1st has ID and name, this can have multiple duplicated IDs and names
the second sheet, can accept multiple IDs, but within each ID should accept ONE product name only
thats all i need to reach
may be simplification helps
 

Attachments

  • sheet 1.png
    sheet 1.png
    4.3 KB · Views: 3
  • sheet 2.png
    sheet 2.png
    6.4 KB · Views: 3
Upvote 0
How about
Excel Formula:
=COUNTIFS($A:$A,$A2,$B:$B,$B2)=1
 
Upvote 0

Forum statistics

Threads
1,215,694
Messages
6,126,254
Members
449,305
Latest member
Dalyb2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top