[Solved] Return smallest number, but never more than 35

Discuss the spreadsheet application
Locked
JerryCaldwell
Posts: 5
Joined: Sat Jul 30, 2022 9:44 pm

[Solved] Return smallest number, but never more than 35

Post by JerryCaldwell »

Hello
I need assist with a complex formula. This one entry will save me hours of work and eliminate the likely mistakes I'd make without it. Hope this description makes sense:
I need a formula that will do the following in cell I33 of attached spreadsheet:
If date in I34 is after 3/1/18 I33=0
If date in I34 is before 3/1/18 I33 = the lesser of I31 or I32 or $35

Any assistance is greatly appreciated. :super:

 Edit: Changed subject, was Need help with formula 
Make your post understandable by others 
-- MrProgrammer, forum moderator 
Attachments
508 Ashland - Notice of Change 2024-25.ods
thank you for your help!
(37.56 KiB) Downloaded 50 times
Last edited by JerryCaldwell on Sun Aug 25, 2024 6:20 am, edited 2 times in total.
Buen d??a y Buena suerte
Apache Open Office Ver: 4.1.12
Windows 10 Home 21H2
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Need help with formula

Post by MrProgrammer »

JerryCaldwell wrote: Sat Aug 24, 2024 7:57 pm If date in I34 is after 3/1/18 I33=0
If date in I34 is before 3/1/18 I33 = the lesser of I31 or I32 or $35
Thank you for the attachment. It helps with the problem that 3/1/18 is ambiguous. 3/1 means March 1st in the United States but January 3rd in most other countries. The volunteers on this forum live in Europe, Asia, the Americas, etc. We don't know what you mean by 3/1/18. Based on cell A6 I presume you mean March 1st. Your attachment shows that the full year is 2018 and not 1918. You do not show an entry in cell I34. Therefore I will assume that the cell will contain a Calc date (that is, a number), not some unspecified-format text date. Read section 3. Dates in cells in Ten concepts that every Calc user should know. The attachment shows that your condition after 3/1/18 really means on or after 2018-03-01.

Try this formula in I33: =IF(I34>=DATE(2018;3;1);0;MIN(I31;I32;35))
I hope you can see that this formula is a fairly direct translation from your desciption in English. If you need help with making the formula understand the date in I34, attach a document which contains your date in that cell. I will not help further unless you attach. If the date is text, not a number, state what the month and day-of-the-month are for that date. To determine if the date is text use View → Value Highlighting. If the cell font turns blue, the cell contains a number. If the cell font is black, the cell contains text. Turn off Value Highlighting when you are done checking the cell. The spreadsheet will be simpler if you use a Calc date instead of text.

Please search first before posting. You seem to have asked the same question two years ago. I didn't study the earlier post in detail. It was also vague about January 3rd versus March 1st.
[Solved] Return smallest number, but never more than 35

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked