Formula for Multiple IFs condition

reza_doang

Board Regular
Joined
May 31, 2010
Messages
187
Hi,

Please help your assistant for multiple ifs condition.

Due DateStatus
1/23/2018 3:58:13 PM1 - 2 weeks
2/13/2018 10:55:43 AMOK
1/29/2018 10:11:13 AM> 1 week
1/15/2018 3:58:13 PM2 - 3 weeks

<tbody>
</tbody>

i want to have formula in column status based on due date and today, sample like above

Please let me know if you need more details

thanks in advance

Reza
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi,

Wouldn't 1/29/2018 be < 1 week rather than > 1 week?
 
Upvote 0
Hi,

Wouldn't 1/29/2018 be < 1 week rather than > 1 week?

Yes, that is correct, sorry for the typo

Due DateStatus
1/23/2018 3:58:13 PM1 - 2 weeks
2/13/2018 10:55:43 AMOK
1/29/2018 10:11:13 AM< 1 week
1/15/2018 3:58:13 PM2 - 3 weeks

<tbody>
</tbody>

thanks for the correction :)
 
Upvote 0
Never mind. My account ahs a problem and I cant script down full formulas
 
Last edited by a moderator:
Upvote 0
I think this formula should work ;)

HTML:
 
Last edited by a moderator:
Upvote 0
Hi,

No problem, but how far back might it go?
This will give you up to more than 3 weeks, but no specifics, you might want to consider # of Days as a result.


Book1
AB
1Due Date
21/23/2018 15:581 - 2 weeks
32/13/2018 10:55OK
41/29/2018 10:11< 1 week
51/15/2018 15:582 - 3 weeks
612/1/2017 10:55> 3 weeks
Sheet6
Cell Formulas
RangeFormula
B2=IF(A2>=TODAY(),"OK",LOOKUP(DAYS(TODAY(),A2),{0,6,13,21},{"< 1 week","1 - 2 weeks","2 - 3 weeks","> 3 weeks"}))


B2 formula copied down.
 
Last edited:
Upvote 0
HTML:
=IF(AND(A2<TODAY(),WEEKNUM(A2,21)=WEEKNUM(TODAY(),21)),"< 1 week",IF(WEEKNUM(A2,21)<WEEKNUM(TODAY(),21),(WEEKNUM(TODAY(),21)-WEEKNUM(A2,21))&" - "&(WEEKNUM(TODAY(),21)-WEEKNUM(A2,21)+1)&" weeks",IF(A2>=TODAY(),"OK")))
 
Last edited by a moderator:
Upvote 0
Oops, had a couple of typos, the 6 should be 7, and the 13 should be 14, this is corrected:


Book1
AB
1Due Date
21/23/2018 15:581 - 2 weeks
32/13/2018 10:55OK
41/29/2018 10:11< 1 week
51/15/2018 15:582 - 3 weeks
612/1/2017 10:55> 3 weeks
71/16/2018 15:582 - 3 weeks
81/9/2018 10:11> 3 weeks
91/10/2018 15:582 - 3 weeks
101/8/2018 10:11> 3 weeks
111/24/2018 10:55< 1 week
121/17/2018 10:111 - 2 weeks
Sheet6
Cell Formulas
RangeFormula
B2=IF(A2>=TODAY(),"OK",LOOKUP(DAYS(TODAY(),A2),{0,7,14,21},{"< 1 week","1 - 2 weeks","2 - 3 weeks","> 3 weeks"}))
 
Upvote 0
Oops, had a couple of typos, the 6 should be 7, and the 13 should be 14, this is corrected:

AB
1Due Date
21/23/2018 15:581 - 2 weeks
32/13/2018 10:55OK
41/29/2018 10:11< 1 week
51/15/2018 15:582 - 3 weeks
612/1/2017 10:55> 3 weeks
71/16/2018 15:582 - 3 weeks
81/9/2018 10:11> 3 weeks
91/10/2018 15:582 - 3 weeks
101/8/2018 10:11> 3 weeks
111/24/2018 10:55< 1 week
121/17/2018 10:111 - 2 weeks

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet6

Worksheet Formulas
CellFormula
B2=IF(A2>=TODAY(),"OK",LOOKUP(DAYS(TODAY(),A2),{0,7,14,21},{"< 1 week","1 - 2 weeks","2 - 3 weeks","> 3 weeks"}))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

thanks Sir, this is working fine... i like this... thanks a ton
 
Upvote 0
You're welcome, glad it's working for you.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,390
Members
448,957
Latest member
Hat4Life

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