Forum Discussion
Adding a 3rd condition to "IF" formula in Excel
Hi all,
I hope some kind soul out there can help me.
I am working on a tight deadline for work, which is an excel sheet where I have managed to successfully create a formula for “if” with 2 conditions, but am struggling with adding the 3rd.
I need to work out a “Due Date” based off a “Date Raised” with a “Priority Level (Low, Medium, High)” for each entry.
Each “Priority Level” has a timeframe associated with it, which gives you the “Due Date”.
- In column A (row starting 2) I have “Date Raised”.
- I column B I have “Priority Level” (Low, Medium, High)
- Low has a due date of 42 days, Medium 28 days and High 14 days
- Column C is “Due Date” column (“Date Raised” + “Priority Level”)
As I mentioned, I have cracked the formula for 2 Priority Levels (IF/OR), but it goes pear shaped when I want a 3rd added.
If it’s not too much trouble, if you could also show me how I would go about adding a 4th and 5th (I don’t need them for this, but just in case I needed it later), I’d be most grateful.
For the record, I did try to look this up online but I couldn’t convey it in a way that a search engine recognised.
Thanks for your help with this, cheers.
As variant
=A3 + LOOKUP(B3, {"High","Low","Medium","Two weeks ago","Yesterday"}, {42,14,28,-14,-1} )
Even better is to build helper table with criteria/delays and XLOOKUP/VLOOKUP, etc., on it.
- Boris_0031Copper ContributorThanks very much. I'll definitely check out some YouTube vids on this this weekend. Much appreciated.
- OliverScheurichGold Contributor
=IF(B3="Low",A3+42,IF(B3="Medium",A3+28,IF(B3="High",A3+14,IF(B3="Yesterday",A3-1,IF(B3="Two weeks ago",A3-14,"")))))
Does this return the intended result?
=IF(B3="Low",A3+42,IF(B3="Medium",A3+28,IF(B3="High",A3+14,"")))
This is the formula without additional (4th and 5th) criteria.
- Boris_0031Copper Contributor
OliverScheurich Thanks very much, this worked a treat. Really appreciate it.