+ Reply to Thread
Results 1 to 5 of 5

Return Value for Current Month

  1. #1
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Return Value for Current Month

    I have a sheet made up of 'Estimates' and 'Actuals' (attached). In column AC when the 8th working day of the current month is reached I want to return the 'Actual Value' for the 'Previous Month'.

    M1 = April, M2 = May and so on. I've been playing around with a combination of 'INT(COLUMN($C18:$Z18)-1)/2)' and '(MOD(COLUMN($C18:$Z18),2)=0)' to try and return the correct value along with

    Please Login or Register  to view this content.
    but have so far failed to get this to work becasue the layout (which is fixed) means I need the value in every alternate cell needs to be returned. AC needs to update to the 'Actual Value' for the prior month on the 8th working day of each current month.

    Can anyone help me to solve this...

    Many thanks
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,734

    Re: Return Value for Current Month

    Your data layout is not clear. Where do I find the actual value for the 8th working day of any given month?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,321

    Re: Return Value for Current Month

    See the attached:

    I have used date fields in row 15 and would advise you do the same as it is much easier to use formula with dates than text.

    Formula in AB18 retrieves the data and I put a date in AB13 for testing: change to TODAY() in formula.

    =INDEX($C$18:$Z$21,,MATCH(EOMONTH($AB$13,-2)+1,$C$15:$Z$15,0)+1)

    Add your test for workday 8

    =IF( today() = Workday(......), Index(.............),"")

    =IF($AB$13=WORKDAY(EOMONTH(TODAY(),-1)+1,8),INDEX($C$18:$Z$21,,MATCH(EOMONTH($AB$13,-2)+1,$C$15:$Z$15,0)+1),"")

    Added updated file.
    Attached Files Attached Files
    Last edited by JohnTopley; 08-30-2015 at 01:49 PM.

  4. #4
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Return Value for Current Month

    Hi Jeff,

    Apologies, of course it made sense to me but I didn't explain it very well. So in the table, the actual value for the prior month only becomes available on the 8th working day of the current month and so will be populated using a formula (not shown on the sheet to keep it simple). Looking at the sample sheet you can see that 'actual' values for months 1 to 4 have been populated because we are past the 8th working day of month 5. The value for August (M5) will be available and will be populated on the 8th working day of September (M6).

    What I'm looking to do in column AC is automatically update the 'actual' value for the prior month on the 8th working day of the current month, but the value needs to remain present until the 8th working day of the following month (i.e. it shouldn't show the value 'only' on the 8th working day). So on the 8th working day of September, column AC will show the 'actual' value for M5 and that will remain there until the 8th working day of October when the value in column AC needs to automatically update to the value that will be entered for September and so on.

    Not sure if that makes it any clearer or if I've made it more confusing?

  5. #5
    Forum Contributor
    Join Date
    06-21-2010
    Location
    -
    MS-Off Ver
    Excel 2010
    Posts
    1,211

    Re: Return Value for Current Month

    Hi John,

    Thanks for this. I'm very restricted in terms of what I can add to the sheet and adding date fields (whilst obviously practical) isn't possible because the table (on my actual sheet) already has column headers and the sheet layout conforms to strict brand guidelines and we can't add to these.

    After a bit of playing around, I adapted your formula to this, which I think will do the same thing without the addition of dates:

    Please Login or Register  to view this content.
    Unless you can see any errors with this approach?

    Many thanks
    Last edited by HangMan; 08-31-2015 at 07:07 AM.

+ 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] Set PivotTable Filter to Current Day, Current Week, Current Month, or Current Year
    By EnigmaMatter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2014, 08:31 AM
  2. Replies: 3
    Last Post: 10-11-2014, 09:04 PM
  3. [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
  4. How to return the current month given a specific value
    By SweetLD215 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-14-2014, 10:41 AM
  5. [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
  6. Return True or False if date range falls within current month
    By kieran614 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-17-2013, 12:02 PM
  7. [SOLVED] Date Formula to Return Week Number in Current Month based on Reporting Period
    By jeversf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-25-2013, 12:10 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