# Excel Formula amendment

#### mrsushi

##### Board Regular
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

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
That formula will return the 7th when today is the 15th.

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?

Excel Formula:
``=MAX(IF(H2:H48<TODAY()-2,H2:H48))-1``

Excel Formula:
``=MAX(IF(H2:H48<TODAY()-2,H2:H48))-1``
Ta. I give that a try

You're welcome & thanks for the feedback.

Replies
0
Views
126
Replies
3
Views
379
Replies
5
Views
228
Replies
17
Views
539
Replies
1
Views
372

1,196,413
Messages
6,015,119
Members
441,872
Latest member
Jyyyyyyyy

### 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.

### Which adblocker are you using?

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

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