If date <= today or cell value <= other cell value, then return text

Unwyred

New Member
Joined
Aug 10, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I've made a spreadsheet to track a chemical inventory and am trying to get a cell to return the text, "1 bottle" if either the expiration date in cell H17 is less than or equal to today or the number of items in the quantity cell (D17) is less than or equal to that of the order point cell (C17).

I can get the formula to work if I just do it for the quantity<order point with: =IF(D17="","",IF(D17<=C17,"1 Bottle","")), but I want it to trigger the "1 bottle" text if the expiration date passes as well.

Have not been able to find anything close to this in any forum so far.


Untitled.png
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Update your formula to:

Rich (BB code):
=IF(D17="","",IF(OR(D17<=C17,H17<=TODAY()),"1 Bottle",""))

BTW thanks for a very clear description of your problem.
 
Upvote 0
Update your formula to:

Rich (BB code):
=IF(D17="","",IF(OR(D17<=C17,H17<=TODAY()),"1 Bottle",""))

BTW thanks for a very clear description of your problem.
Works like a charm, thank you so much for the quick reply as well. I was sitting here for 2 hours racking my brain before I signed up to make a post here.
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,183
Members
452,615
Latest member
bogeys2birdies

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