+ Reply to Thread
Results 1 to 5 of 5

Formula to return previous month balance (EDATE) not working

  1. #1
    Forum Contributor
    Join Date
    12-02-2022
    Location
    USA
    MS-Off Ver
    2021
    Posts
    168

    Formula to return previous month balance (EDATE) not working

    I have a 2 column table with month and balance.

    My formulas to return previous month balance isn't working.


    =VLOOKUP(EDATE(TEXT(B1,"mmm"),-1),A6:B17,2)
    =SUMIFS(B6:B17,A6:A17,EDATE(B1,-1))

    Thank you in advance.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,085

    Re: Formula to return previous month balance (EDATE) not working

    probably be a better way to do this

    But the months you have are NOT date - just text
    so , you cna convert the AUG - to a real date using
    DATEVALUE("1/"&B1&"/23")
    that makes it the 1st of month
    now take 1 away to last month
    DATEVALUE("1/"&B1&"/23")-1
    Now change to text to get JUL
    DATEVALUE("1/"&B1&"/23")

    TEXT(DATEVALUE("1/"&B1&"/23")-1,"MMM")

    then add to the lookup

    =VLOOKUP(TEXT(DATEVALUE("1/"&B1&"/23")-1,"MMM"),A6:B17,2)
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Forum Contributor
    Join Date
    12-02-2022
    Location
    USA
    MS-Off Ver
    2021
    Posts
    168

    Re: Formula to return previous month balance (EDATE) not working

    That worked! Thank you!

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,085

    Re: Formula to return previous month balance (EDATE) not working

    there maybe an issue - as you have dtes and text , not sure it works correctly
    may need to change the lookup to dates if that is wht you want

  5. #5
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,085

    Re: Formula to return previous month balance (EDATE) not working

    if you change the list to real dates and format as mmm
    then change the lookup to

    =VLOOKUP((DATEVALUE("1/"&B1&"/23")-1),A6:B17,2)

    now it will work correctly and if JAn is entered return N/A

    as you are using nearest lower value - it picks up the 1 of month

    could change so edate , bit more involved using false at end of lookup
    Attached Files Attached Files
    Last edited by etaf; 08-21-2023 at 03:18 PM.

+ 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] Formula to return previous month balance
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-27-2023, 07:59 PM
  2. [SOLVED] Return previous month and current month in text cells.
    By DarkSoul in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2023, 07:55 AM
  3. Need a formula to return balance of last day of previous month
    By thematrix05 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-02-2023, 05:53 PM
  4. Excel Previous Month & Latest Balance
    By fkarim74 in forum Excel General
    Replies: 2
    Last Post: 07-26-2022, 10:57 AM
  5. [SOLVED] Excel formula to lookup data and then return Result for Previous Month
    By Excel enthusiast in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-19-2019, 03:53 PM
  6. [SOLVED] Formula for working out and populating a table using the previous month totals
    By amasson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-24-2014, 11:12 AM
  7. [SOLVED] Reference end of month balance on previous workshhet
    By John Richards in forum Excel General
    Replies: 2
    Last Post: 04-19-2005, 04:06 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