Need help with a dynamic range

shnelson5068

New Member
Joined
Sep 1, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have a formula for a dynamic range of data that represents one number per day for a month. Once the month is over, I am manually updating the range with the cell reference of the first day of the new month. Is there something I can add to my offset formula to automatically roll my named range to the next month? Here is my range:

=OFFSET($I$177,,,COUNTA($I$177:$I$1048576),1)

Cell I177 represents the value on August 1st and the range pulls the data for the entire month (cell I178 has the value for Aug 2nd, etc). Now that we are in September, I need the range to start on Sep 1, so the new formula is

=OFFSET($I$200,,,COUNTA($I$200:$I$1048576),1)

as cell I200 is the value for the Sep 1st data. Would love some help to get the process of rolling months automated.

Thanks!
 

Attachments

  • Excel Question.png
    Excel Question.png
    69.9 KB · Views: 11

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If you want to go by today's actual date, you can do something like this (tested)
Excel Formula:
=LET(FOM,INDEX($I:$I,MATCH(EOMONTH(TODAY(),-1)+1,$I:$I,0)),OFFSET(FOM,,,COUNTA(FOM:$I$1048576),1))
This assumes that you will never have data that goes past the current month.

But if today is 9/1 and you need to go back and do August data you will need a different solution.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,217
Members
452,619
Latest member
Shiv1198

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