+ Reply to Thread
Results 1 to 8 of 8

Formula to find change from specific weekday

  1. #1
    Registered User
    Join Date
    11-08-2022
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Formula to find change from specific weekday

    Hi

    I need to find the change in prices from previous day for all other days but for Thursday, this difference should be from previous Thursday and if in case previous Thursday not available then previous availble day in previous week e.g. Wednesday of previous week.
    Thank you very much
    Saurabh
    Attached Files Attached Files

  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,780

    Re: Formula to find change from specific weekday

    Welcome to the forum.

    Please explain the result for the first Thursday - why is this different? Just trying to establish the logic.
    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
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Formula to find change from specific weekday

    In F4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and copy down.
    You have not described what to do in a situation like in row 6 (Thursday, but no prevoius week data). This is why IFERROR had to be used. And just previous day difference calculated as in your sample output.
    If you willl keep
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for first week, then formula could be easier (F8 and copy down):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  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: Formula to find change from specific weekday

    f4=E4-IFERROR(VLOOKUP(IF(WEEKDAY(B4)=5,B4-7,B4-1),B$3:E3,4),E3)
    try above, copy and paste toward down
    Samba

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

  5. #5
    Registered User
    Join Date
    11-08-2022
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Smile Re: Formula to find change from specific weekday

    thank you very much Kaper and Samba_ravi. It is exactly what I was looking for.

  6. #6
    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,780

    Re: Formula to find change from specific weekday

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  7. #7
    Registered User
    Join Date
    11-08-2022
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Formula to find change from specific weekday

    If the data of previous week is not available then in that case difference on Thursday can't be calculated, so it's fine to take the same logic as other days for the first Thursday only. I hope I am able to clarify. Thank you

  8. #8
    Forum Expert
    Join Date
    01-05-2013
    Location
    Singapore
    MS-Off Ver
    H&B2016 & H&B2021
    Posts
    3,057

    Re: Formula to find change from specific weekday

    Another option, =E4-IF(WEEKDAY(B4,2)=4,XLOOKUP(B4-7,B$3:B3,E$3:E3,,-1),E3).

+ 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. WEEKNUM or WEEKDAY date-specific
    By dgibney in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-05-2021, 10:29 AM
  2. need a little change in weekday formula
    By akshay6s in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 10-11-2019, 06:35 PM
  3. Replies: 1
    Last Post: 05-02-2015, 06:07 AM
  4. Formula to find first weekday in month
    By leleco in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-21-2014, 03:01 PM
  5. Specific Weekday within date range
    By nicksmomma in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-29-2013, 04:05 PM
  6. [SOLVED] Need help w/formula to find to the next weekday (Tuesday) after 7 years from specific date
    By sfmauldin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-04-2012, 08:17 PM
  7. Next Specific Weekday
    By Sir08 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2009, 02:56 PM

Tags for this Thread

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