Reputation: 1
What I'm trying to do is give a due date based on an input date, type of review, and department.
For example if the department is ABC
and the review is retrospective
, the due date will be the input date + 30 days
.
But if the department is ABC
and the review is concurrent
, then the due date will be input date + 1 day
.
I know I can concatenate the department and review into the vlookup table but I'm not so sure how to get the output to be the due date that I want.
Can anyone help?
EDIT:
Per the first answer below, I hashed out an input table with concatenated columns just in case I needed them. It is a bit more complicated than I originally thought.
I'd love to simply edit the source data but the report isn't readily available in the database. Could I still use the suggestions below?
Upvotes: 0
Views: 520
Reputation: 3064
Assuming you have a lookup table for the number of days to add depending upon the department and review type similar to the one below, you can use an INDEX
/MATCH
/MATCH
and simply add it to the input date:
=$A2+INDEX($H$4:$J$5,MATCH($B2,$G$4:$G$5,0),MATCH($C2,$H$3:$J$3,0))
SOLUTION FOR AN ALTERNATIVE LOOKUP TABLE LAYOUT
If your layout table is more like as below, you can use a MINIFS
formula (or MAXIFS
if you would prefer):
=$A2+MINIFS($I$3:$I$8,$G$3:$G$8,$B2,$H$3:$H$8,$C2)
Upvotes: 0