+ Reply to Thread
Results 1 to 6 of 6

looking up cell value based on whether its the current month, or next month.

Hybrid View

  1. #1
    Registered User
    Join Date
    04-29-2020
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    50

    Question looking up cell value based on whether its the current month, or next month.

    Hi folks, new here. I'm looking to update a Budget spreadsheet I've modified over the years and right now I'm stuck on updating one formula..

    Summary sheet
    My table has 3 columns. Column B looks up column A's matching cell on my sheet named Personal Budget and shows the value for the current month. Column C references due dates I placed in a table on a sheet called Schedule.

    Column A = text
    Columb B =VLOOKUP($A4,'Personal Budget'!$A$4:$M$157,MONTH(TODAY())+1,0)
    Column C =EDATE(TODAY()-DAY(TODAY())+(VLOOKUP($A4,Schedule!Fixed_Expenses,2,0)),--(DAY(TODAY())>(VLOOKUP($A4,Schedule!Fixed_Expenses,2,0))))


    The Personal Budget sheet (Personal Budget'!$A$4:$M$157) has rows that match Summary sheet's Column A and columns that = each month of the year (January....December)

    So, for example, if today's date is 4/10 I have a bill due on 4/26 currently, it will display the value for month 4 for the entire month, until 5/1. (because on 5/1 it looks for the cell in month 5)

    What I would like it to do is change once the due date has hit and not wait for it to change on the first day of the month to match that month / column

    The perfect formula would combine these....
    If $C4 > today and $C4 =month(today), then display the cell value found via lookup on Personal Budget sheet month(today)
    If $C4 > today and $C4 is next month, then display the cell value found via lookup on Personal Budget sheet next month


    Any help would be greatly appreciated.

    Sample attached.

    Thanks
    Murph
    Attached Files Attached Files
    Last edited by BigPapaMurf; 04-29-2020 at 08:19 PM. Reason: changed font color on month column titles to be viewable.

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,156

    Re: looking up cell value based on whether its the current month, or next month.

    welcome to the forum, Murph. you didn't explain what should happen if date is lesser or equals to today. but change the date in Personal Budget sheet to be jan2020 in cell B2. copy it across to M2.

    if you don't like the presentation, custom format to mmmm.

    then in Summary sheet B3, use:
    =IF(C3>TODAY(),SUMIF('Personal Budget'!A:A,A3,INDEX('Personal Budget'!B:M,,MATCH(EOMONTH(C3,-1)+1,'Personal Budget'!$B$2:$M$2,0))),"nothing")

    change "nothing" to what you want if C3 <= Today

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  3. #3
    Registered User
    Join Date
    04-29-2020
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    50

    Re: looking up cell value based on whether its the current month, or next month.

    Benishiryo that did work thanks.

  4. #4
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,515

    Re: looking up cell value based on whether its the current month, or next month.

    Try this in B3 of summary sheet and copy down:
    Formula: copy to clipboard
    =VLOOKUP($A3,'Personal Budget'!$A$2:$M$14,1+MATCH(MONTH(C3),COLUMN('Personal Budget'!$A$2:$M$2),0),0)

    Good luck!

  5. #5
    Registered User
    Join Date
    04-29-2020
    Location
    Texas
    MS-Off Ver
    Office 365
    Posts
    50

    Re: looking up cell value based on whether its the current month, or next month.

    this also worked! thanks

  6. #6
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,515

    Re: looking up cell value based on whether its the current month, or next month.

    You're welcome!
    Glad to help.

+ 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] Conditional formatting based on Current month & month of another cell.
    By KayA. in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2018, 03:25 PM
  2. [SOLVED] Determine work days in current month or next month based on day of the month
    By sbrnard in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2014, 05:14 PM
  3. [SOLVED] Pick a cell containing current month actulas based what the current month is.
    By vanbasten007 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-10-2014, 01:17 AM
  4. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-24-2013, 08:45 AM
  5. VBA: Piviot table Month auto select based on current month?
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-21-2013, 07:18 AM
  6. [SOLVED] Help with a system to auto populate month names based on current month
    By rosboy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-01-2012, 05:17 PM
  7. [SOLVED] VBA to identify the current month and previous month based on system date
    By ravikumar00008 in forum Excel General
    Replies: 10
    Last Post: 07-26-2012, 10:04 AM

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