+ Reply to Thread
Results 1 to 8 of 8

Setting current week as week 0 on weekly cashflow

  1. #1
    Registered User
    Join Date
    11-17-2021
    Location
    Bristol, England
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2110 Build 16.0.14527.20234) 32-bit
    Posts
    16

    Unhappy Setting current week as week 0 on weekly cashflow

    Hi,

    Can someone please help me? My excel skills are basic at best, as are my explaining skills so please bear with me lool.

    We've got a daily cashflow that feeds into our weekly cashflow. I'd like (actually our CFO would) our weekly cashflow to show the current week as week 0, with the week before being week -1 and week after being week 1. I'm currently doing this manually and it's a pain.

    Anyone have a work around? I've attached a copy of the headings. It's row 2 that i'd like to auto update so that each new week, the week we are in becomes week 0 and everything moves along.

    I could also do with some help on a different matter but it's not a priority for me. In row 3 we have the week number. This uses the following formulae "=WEEKNUM(F4,21)" to take the week ending date from below and give a week number. So 30-Apr-21 in F4 becomes 17 in F3.

    My issue is that once it runs for more than a year there will be two 17's which will effect the criteria for the following formulae used to group the daily days into weekly. We use the following formulae to group the daily data =SUM(IF('GBP Cashbook'!$B$1:$B$196=Summary!$A16,IF('GBP Cashbook'!$C$4:$ZW$4=Summary!AG$5,'GBP Cashbook'!$C$1:$ZW$196))). The second "IF" that refers to AG5 is looking at the week number, which in the case of above would be 17.

    If we extend this cashflow to 2022, there will be two 17's so it will bring back data from both and make the summary wrong.

    Is there a way I can change the original formulae (=WEEKNUM(F4,21)) so that it makes the week number display as 17-21, so the week number it is with the year inserted?

    Help on either matter would be greatly appreciated!

    Cheers
    Attached Files Attached Files
    Last edited by AliGW; 11-17-2021 at 08:06 AM. Reason: Irrelevant section of title removed - this is a help forum!!!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Setting current week as week 0 on weekly cashflow

    Try this:

    =WEEKNUM(F4,21)&"-"&RIGHT(YEAR(F4),2)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-17-2021
    Location
    Bristol, England
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2110 Build 16.0.14527.20234) 32-bit
    Posts
    16

    Re: Setting current week as week 0 on weekly cashflow

    That's worked for the second part - thanks Ali!

  4. #4
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Setting current week as week 0 on weekly cashflow

    try below formula in B2, Copy and paste towards right
    ="Week "&IFERROR(1/(1/COUNTIFS($B4:B4,">"&TODAY())),-COUNTIFS(B4:$BA4,"<="&TODAY())+1)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Setting current week as week 0 on weekly cashflow

    You need to expand on what exactly you mean by this:

    the week we are in becomes week 0 and everything moves along.

  6. #6
    Registered User
    Join Date
    11-17-2021
    Location
    Bristol, England
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2110 Build 16.0.14527.20234) 32-bit
    Posts
    16

    Re: Setting current week as week 0 on weekly cashflow

    Quote Originally Posted by samba_ravi View Post
    try below formula in B2, Copy and paste towards right
    ="Week "&IFERROR(1/(1/COUNTIFS($B4:B4,">"&TODAY())),-COUNTIFS(B4:$BA4,"<="&TODAY())+1)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    This has done it! Thanks Samba!

    If you find a chance might you be able to explain what exactly each part of the formulae is looking at so i can try and learn myself?

    No worries if not, just having it correct is good enough for me.

  7. #7
    Registered User
    Join Date
    11-17-2021
    Location
    Bristol, England
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2110 Build 16.0.14527.20234) 32-bit
    Posts
    16

    Re: Setting current week as week 0 on weekly cashflow

    Quote Originally Posted by AliGW View Post
    You need to expand on what exactly you mean by this:
    Sorry, I meant the week ending 19-11-2021 would be considered as week 0. Then last week, ending 12-11-2021 would be week -1 and next week would be week 1.

    Samba has solved it above though so please don't use any time on it.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,916

    Re: Setting current week as week 0 on weekly cashflow

    I won't, but if that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Countifs with criteria as current week & last week
    By nadimqaisar in forum Excel General
    Replies: 4
    Last Post: 09-18-2019, 11:56 AM
  2. Help with Pivot - Need to get current week and next week numbers
    By Beso90 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-26-2019, 03:54 PM
  3. UserForm with that shows Previous Week Data and allows you to update current week
    By hicks1ch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-22-2014, 09:47 AM
  4. Chart previous week data as grouped and current week as ungrouped
    By r_a_c_a_4_u in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-17-2013, 12:55 PM
  5. How to: identify repeat offenders within a 3 week period (week per week basis)
    By Heloc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2012, 12:43 AM
  6. Replies: 4
    Last Post: 03-21-2011, 05:37 PM
  7. copy week total in weekly sales worksheet to appropriate week in monthly sales
    By Sandy2976 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-15-2009, 01:04 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1