We help IT Professionals succeed at work.

Highlight Cell if Match

Billa7
Billa7 asked
on
947 Views
Last Modified: 2012-06-27
I need Experts help create a conditional formula to highlight cell at Column D in red if the following condition comply:

If the cell in Column D has been:

- Sharing the same date (Column C) and
- Time overlap (Column D)

e.g. Cell G3 has same data with G4 (Same Date), however the timing at Column D have been clashed, therefore cell G3 need to highlighted in red.   Attached the workbook.
CrossCheck.xls
Comment
Watch Question

Most Valuable Expert 2012
Top Expert 2012

Commented:
To try to keep this simple, I created 3 helper columns to the right (for the first 250 rows) that pull the start, end time, then calculate 'clashes' based on date and time.  If the date is the same and the end-time comes after another record's start time, while simultaneously before that other record's end time, I define that as TRUE, with formula:

Where (column) C is the Date, G is Code (tested for being empty, because we're copying down a bunch of rows), T is Start Time and U is End Time:
[V2]=SUMPRODUCT(($G$2:$G$250<>"")*($C$2:$C$250=C2)*(U2>=$T$2:$T$250)*(U2<=$U$2:$U$250))>1

and copied down for the first 250 rows.

I then set up conditional formatting in column G looking at column V.

See attached,

Dave
CrossCheck.xls

Author

Commented:
Hi Dave,

Thanks for the formula. We only highlight the Column G cell if the same "Code" clashed with timing. E.g. Cell G3 is being highlighted in red, by right should not. Also cell G6, shouldn't highlight in red since this code was not used by other cell within the same date.

Author

Commented:
Hi Dave,

Please let me know if you need more clarification from my end.
Most Valuable Expert 2012
Top Expert 2012
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Hi Dave,

Thanks for the revised version, the "Code" can be more than 2 for some cases.
Most Valuable Expert 2012
Top Expert 2012

Commented:
that works. I should have said there should be more than 1, not pairs, but at least a pair.

Dave

Author

Commented:
Hi Dave,

What's the conditioning formatting formula? I can't find it in the attached wb. Please advice.

Author

Commented:
Thanks Dave

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.