Conditional Formula Help

fishin

Board Regular
Joined
Jan 18, 2009
Messages
184
In need of a conditional statement that addresses the requirement below.


If the result of subtracting today’s date from the date posted in J221 is greater than 180 but less than 366, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Try:

=IF(AND(J221-TODAY()>180,J221-TODAY()<366),J221-TODAY(),"")
 
Upvote 0
Thanks for your quick response. You responded with:
=IF(AND(J221-TODAY()>180,J221-TODAY()<366),J221-TODAY(),"")

My initial request for a conditional statement was:
Follow-Up Request(s):

"If the result of subtracting today’s date from the date posted in J221 is equal to or greater than 0 but less than 91, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank."

"If the result of subtracting today’s date from the date posted in J221 is less than 0, return the result to the targeted recipient cell as a positive number, otherwise the targeted recipient cell is to remain blank."
 
Upvote 0
Try

=IF(AND(J221-TODAY()>=0,J221-TODAY()<91),J221-TODAY(),IF(J221-TODAY()<0,TODAY()-J221,""))
 
Upvote 0
Thanks again for the response, but I actually need two individual conditional statements. The one provided, =IF(AND(J221-TODAY()>=0,J221-TODAY()<91),J221-TODAY(),IF(J221-TODAY()<0,TODAY()-J221,"")) is sort of a blend between the two issues I attempted to address in my post as follows:

Would you please respond again?

"If the result of subtracting today’s date from the date posted in J221 is equal to or greater than 0 but less than 91, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank."

"If the result of subtracting today’s date from the date posted in J221 is less than 0, return the result to the targeted recipient cell as a positive number, otherwise the targeted recipient cell is to remain blank."
 
Upvote 0
"If the result of subtracting today’s date from the date posted in J221 is equal to or greater than 0 but less than 91, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank."

"If the result of subtracting today’s date from the date posted in J221 is less than 0, return the result to the targeted recipient cell as a positive number, otherwise the targeted recipient cell is to remain blank."

Doesn't it do that?
 
Upvote 0
To cover all three scenarios you have provided:

  1. If the result of subtracting today’s date from the date posted in J221 is greater than 180 but less than 366, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank.
    Code:
    =IF(AND(J221-TODAY()>180,J221-TODAY()<366),J221-TODAY(),"")
  2. "If the result of subtracting today’s date from the date posted in J221 is equal to or greater than 0 but less than 91, return the result to the targeted recipient cell, otherwise the targeted recipient cell is to remain blank."
    Code:
    =IF(AND(J221-TODAY()>0,J221-TODAY()<91),J221-TODAY(),"")
  3. "If the result of subtracting today’s date from the date posted in J221 is less than 0, return the result to the targeted recipient cell as a positive number, otherwise the targeted recipient cell is to remain blank."
    Code:
    =IF(J221-TODAY()<0,TODAY()-J221,"")
 
Upvote 0
Thanks....Number 3. is perfect.....Number 2 is ever so close. I believe what I missed relative to number 2. was to state that if the difference between todays date and the date posted in J221 was 0 (zero), in other words, the dates were the same, then in addition to the values 1 thru 90, I also want the value 0 (zero) to post in the recipient cell when that is the case.
 
Upvote 0
Then for scenario 2:

=IF(AND(J221-TODAY()>=0,J221-TODAY()<91),J221-TODAY(),"")
 
Upvote 0

Forum statistics

Threads
1,224,579
Messages
6,179,656
Members
452,934
Latest member
mm1t1

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