3

Trying to figure out how to write a formula in Google Sheets that will automatically calculate a deadline for me based on priority and an established date.

I have 3 columns: Date (A), Priority (B), and Deadline (C).

Here's what I'm trying to accomplish:

  • If Priority (B) equals 1, then return A.
  • If Priority (B) equals 2, then return A+3.
  • If Priority (B) equals 3, then return A+7.

How in the hell do I write this as a single formula that goes into each row under column C (Deadline)?

2 Answers 2

2

Nested ifs is one obvious way.

=IF(B1=1,A1,IF(B1=2,A1+3,IF(B1=3,A1+7,0)))

2
  • Thank you! This is the EXACT formula I needed and it worked like a charm.
    – Keiko Z
    Commented Jan 31, 2018 at 18:47
  • I'm glad it helped you. Please consider "accepting" this answer as a signal to future readers. (More at What should I do when someone answers my question)
    – ale
    Commented Jan 31, 2018 at 18:49
2

As long as you're working with positive integers under 30, CHOOSE() would be a way to go:

=CHOOSE(B1,A1,A1+3,A1+7)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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