Change dates to weekly

CHML

Board Regular
Joined
Mar 19, 2023
Messages
57
Office Version
  1. 2019
Platform
  1. Windows
  2. Web
Hi. How could I get an average amount per week? Let's say from Sat - Fri. Also, is there a way I could format dates from the current view to a weekly cycle? e.g. A3:A8 should all be the last Friday of that week to show all these dates belong to this billing cycle.

1691094879867.png

So it would look like this
1691095289983.png


Once I get it like this I could quickly get it done via a Pivot Table.

Thank you in advance.
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
As far as the first part of your requirement goes (converting all dates to Fridays) - please try the following on a copy of your data. Just change the sheet name to suit.
VBA Code:
Option Explicit
Sub Fridays()
    Dim ws As Worksheet
    Set ws = Worksheets("Sheet1")       '<~~ *** Change to actual sheet name ***
    With ws.Range("A3", ws.Cells(Rows.Count, "A").End(xlUp))
        .Value2 = Evaluate(.Address(, , , 1) & "+7-WEEKDAY(" & .Address(, , , 1) & "+1)")
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,233
Members
449,092
Latest member
SCleaveland

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