Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've trying to make a simple task list in Microsoft Excel 2012:

Task#  Parent Task#  Task Description  Days  Due Date
1                    Catch the llama   1
2      1             Shave the llama   1
3      2             Paint the llama   3     31/3/2012

In the "Due Date" column I want to be able to do the following calculation:

If a child task has a parent task then subtract the number of days the parent task will take from it's due date for the due date of the child task.

So "Shave the llama" would have a "Due Date" of "28/3/2012" as it would subtract the 3 days it takes to "Paint the llama", which is it's parent task.

To achieve this I need to search the "Parent Task#" column and then reference additional cells on the matched row.

How would I achieve this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

E2==E3-VLOOKUP(A2,$B$1:$D$3,3,FALSE)
E1==E2-VLOOKUP(A1,$B$1:$D$3,3,FALSE)

Right?

Vlookup should do what you want.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.