# Excel 2007/2010 Function to input value based upon multiple criteria

I want to use a function that will input the number 3 if a work center shift 1 and 2 occurs on the same from date. Also, If the condition is met, I only want to put it on the row where it first ocured.

+ I also have a part two that I need help with if any of you have conditional formatting experience.

Paul
ExcelFunctionHelp.xlsx
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
didn't get your question properly.. can you explain what you actually want.
0
EngineerCommented:
Enter this in I2 and copy down

=IF(COUNTIFS(F:F,F2,B:B,B2)>1,3,"")
0
Author Commented:
Is there anyway to not include duplicates within this function?  For instance, if I have the following date ranges:

WrkCntr  From Date    To date    Shift    DupShift
2500        5/18/12        5/19/12   1
21300      6/4/12          6/4/12     1             3
21300      6/4/12          6/5/12     2

So the calendar will be setup: With Red color for 6/4/12 and then blue color for 6/5/12/  Notice Shift 1 and two are scheduled for the same day 6/4/12 only.  Please refer to the excel sheet

=IF(COUNTIFS(F:F,F2,B:B,B2)>1,3,"")
0
EngineerCommented:
Try

=IF(COUNTIFS(F2:\$F\$1000,F2,B2:\$B\$1000,B2)>1,3,"")
0

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
Worked perfectly.  Thanks.

Please don't forget there is a part two under the conditional formatting section.

Thanks again.
0
Author Commented:
Worked as described.
0
###### It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.