Excel Formula amendment

mrsushi

Board Regular
Joined
Nov 18, 2006
Messages
180
Office Version
  1. 2010
I have this formula in Excel (as per below). The result returns the date 07.10.2021

=MAX(IF(H2:H48<TODAY(),H2:H48))-1

The List that its referencing is Column I and has a number of dates

16/09/2021​
23/09/2021​
01/10/2021​
08/10/2021​
15/10/2021​
22/10/2021​
01/11/2021​
10/11/2021​
17/11/2021​

Is there anyway the formula can be tweeked to keep the return value on 7th when today becomes the 15th? As you will see from the above formula, when the day becomes the 15th, it will select 15th - 1 day giving a return value of the 14th.

Any ideas will be much appreciated

Many thanks
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
That formula will return the 7th when today is the 15th.
 
Upvote 0
That formula will return the 7th when today is the 15th.
Sorry i meant from tomorrow, how can the formula be amended to select the previous 2 dates in the list ie 7th.
Would it be best to use another formula which selects the previous 2 dates when it pasts the data ie Today itself?
 
Upvote 0
How about
Excel Formula:
=MAX(IF(H2:H48<TODAY()-2,H2:H48))-1
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,958
Messages
6,122,475
Members
449,087
Latest member
RExcelSearch

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