I'm currently working on an electrical usage billing period spreadsheet where I import the usage data for each day in a given month. The first column has the date for each day of the month (12/21/2022 12:00:00 AM, for example) listed for the given billing period, but every month has a different number of days. Sometimes there are 30 rows in the column for days 1-30, 31 rows for days 1-31, etc. I am using the formula:
=TEXT(C10,"mm/dd/yy")&" - "&TEXT(C40,"mm/dd/yy")
to show the specific dates for the billing period, but "C40" can change to C39, C41, etc., depending on the number of days in the month. I've been changing "C40" in the formula manually for each billing period. Is there a formula that I can use that automatically adjust "C40", in this example, to be variable depending on how many items (days) are in the column? I'm using COUNTA to get the total number of rows with data in the column C10 to C45 but don't know how to use that in the formula shown above. Do you happen to know of a way for C40 to be variable depending on how much data is in a column?
Thanks in advance for any help you can offer!