Change dates to weekly

CHML

Board Regular
Joined
Mar 19, 2023
Messages
73
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

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
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,224,828
Messages
6,181,201
Members
453,022
Latest member
RobertV1609

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