Excel formula for this scenario

Stylikzer

New Member
Joined
Aug 7, 2020
Messages
9
Office Version
  1. 2019
Platform
  1. Windows
Hi. I am not good with formulas and need help writing this one. It pertains to date calculations if less than 30 days, 30-60 days, or greater than 60 days

What I am looking for is if Field O2 is >0 show"Ignore", if O2 is <0, then proceed to subtract Today's date from the start date field. If date calculation is <30 days, show < 30 days. If date calculation is between 30-60 days, show 30-60 days. If the date calculation >60 days, show >60 days.

Any help with this will be appreciated.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You have not clarified what if O2=0, Considering O2=0

Book1
OPQ
1Start Date
2-109/07/2020<30
3
Sheet1
Cell Formulas
RangeFormula
Q2Q2=IF(O2>=0,"Ignore",LOOKUP(TODAY()-P2,{0;31;61},{"<30";"30-60";">60"}))
 
Upvote 0
Hi Stylikzer,

Is this what you wanted?

Stylikzer.xlsx
HIN
1Start DateResponse
201-Jan-20>600
307-Jun-20>60
408-Jun-20>60
506-Jul-2030-60
608-Jul-2030-60
709-Jul-20<30
830-Jul-20<30
911-Aug-20<30
1023-Aug-20<30
1104-Sep-20<30
Sheet1
Cell Formulas
RangeFormula
I2:I11I2=IF($N$2>0,"Ignore",CHOOSE((TODAY()-H2>59)+(TODAY()-H2>29)+1,"<30","30-60",">60"))
 
Upvote 0
Hi CA_Punit and Toadstool
Thank you for your help. I tried both of your formulas, but when i executed it, I got "ignore" for all results when it should have populated the <30 or 30-60 or >60
=IF(O380>=0,"Ignore",LOOKUP(TODAY()-H380,{0;31;61},{"<30";"30-60";">60"}))
=IF(O373>0,"Ignore",CHOOSE((TODAY()-H373>59)+(TODAY()-H373>29)+1,"<30","30-60",">60"))
1596829812195.png

I am not sure what I am doing wrong?
 
Upvote 0
It is a formula
=if(A374="","",IFERROR(if(networkdays(H374,N374)>=0,networkdays(H374,N374),0),"-"))
 
Upvote 0
So "-" is a character string so resolves as greater than zero.
You can change your IFERROR to return 0 instead of "-" or my =IF(O373>0,"Ignore" to =IF(O373="-","Ignore"
 
Upvote 0

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

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