Highlight cell if two columns don't match two other columns

Tarvalon14

New Member
Joined
Nov 3, 2022
Messages
7
Office Version
  1. 2019
Platform
  1. Windows
Hi, I was a board regular many years ago. I've been away for a while now. I am in need of help, please. I really don't know what to search for so I'm sorry if this has been answered. See below!

I need my workbook to make sure that an employee is charging the correct code and if not to highlight a cell or give me an error message. Some employees don't charge to these projects so the cells may be blank. Also, I would like for it not to return an error if there is a correct charge number but they didn't work on the projects. Would it be possible to return an error if they did charge when they're not set up to charge as well?

The master roster tab contains the employee information and the correct charge codes. I can't change this spreadsheet around much. It gets compared to the client timesheet audit tab.

ABCD (unique value)E **
NameLast NameFirst NameEmployee IDCharge Codes
Jon SnowSnowJonSNJO000011234 (error message because he charged the wrong code)
Cersei LannisterLannisterCerseiLACE000031234 (no error message because she didn't charge the code)
Sansa StarkStarkSansaSTSA00002(different error message because she charged and isn't set up)
Robert BeratheonBeratheonRobertBERO000046789 (no error message because he charged the correct code)

The client timesheet audit tab contains the projects and charge numbers that were actually charged. I can change this query up however I need to. This is just a data dump from a database. There will be multiple entries for the same employees and I need error messages if anything is charged improperly.

ABC (unique value)DE F **
First NameLast NameEmployee IDDateProject NumberCharge Codes
JonSnowSNJO0000110/31/202219961234
JonSnowSNJO0000110/29/202219962345
SansaStarkSTSA0000210/28/202219961234
RobertBeratheonBERO0000410/27/202219966789

Thanks in advance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Could you do Data Validation for the cell where the employees charge the codes? That way they should be able to select the correct code.

Book1
ABC
1
2
3Worked on Project?Cells to select codeCharge
4112221222
5023340
6033450
7133453345
8
9Charge code list
101222
112334
123345
131111
14
Sheet2
Cell Formulas
RangeFormula
C4:C7C4=B4*A4
Cells with Data Validation
CellAllowCriteria
B4:B7List=$B$10:$B$13



For data validation of cell B4.

Prepare a list of charge codes

1 - select B4
2 - go to Data
3 - select data validation

1667562089304.png



4 - Allow List
5 - Select the cells that host the list


1667562154429.png


6 - Just copy b$, it will copy Data Validation settings, too.



You could add a column which deals with worked on project (1) or not (0)
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

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