+ Reply to Thread
Results 1 to 6 of 6

Reference to row at beginning of month?

  1. #1
    Forum Contributor
    Join Date
    03-29-2013
    Location
    US
    MS-Off Ver
    Office 2016
    Posts
    109

    Reference to row at beginning of month?

    I have worksheets that record a value for something taken on a daily basis, one row per day. On the first of each month I want to know the difference (gain or loss) from the first of the previous month. How much did my IRA grow, how much weight did I lose, etc.

    This is the sort of formula I use now. Each month it requires me to manually editing the row number of the 1st of the month. Here, the date is in column C, the value in column D. "If it's the 1st of the month, display the difference, otherwise display nothing."

    =IF(AND(DAY($C205)=1, $D205>0), $D205-$D$175, "")

    How would I construct a formula that could do this automatically? In the formula above, the '175' would need to be the current row number minus the number of days in the previous month.

    Part 2: More complex (to my thinking) would be to do it on a daily basis, as you have to figure the offset from the row containing the value for the 1st of the current month.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Reference to row at beginning of month?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,494

    Re: Reference to row at beginning of month?

    This might work well enough for you:

    =D205-VLOOKUP(EDATE(C205,-1),C:D,2,0)

    This will take the number from exactly one month ago away from today's number.
    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.

  4. #4
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Reference to row at beginning of month?

    Try this in E2 and copy down

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

  5. #5
    Forum Contributor
    Join Date
    03-29-2013
    Location
    US
    MS-Off Ver
    Office 2016
    Posts
    109

    Re: Reference to row at beginning of month?

    Quote Originally Posted by AliGW View Post
    This might work well enough for you:

    =D205-VLOOKUP(EDATE(C205,-1),C:D,2,0)

    This will take the number from exactly one month ago away from today's number.
    Perfect. Thank you.

  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. 2406 (Windows 11 23H2 64-bit)
    Posts
    82,494

    Re: Reference to row at beginning of month?

    Glad to have helped!

+ 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] Calculation of days per month for dates beginning in one month and ending in another month
    By Fahrettin in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-07-2015, 04:52 PM
  2. [SOLVED] YTD total from beginning of year to last month
    By rs1aj in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-05-2015, 06:16 PM
  3. [SOLVED] How to reset a field number to 1 at the beginning of each month.
    By SGT in forum Access Tables & Databases
    Replies: 5
    Last Post: 10-03-2014, 03:43 AM
  4. Replies: 2
    Last Post: 07-08-2013, 06:06 AM
  5. [SOLVED] Beginning of Month Function
    By mycon73 in forum Excel General
    Replies: 2
    Last Post: 12-03-2012, 01:19 AM
  6. VB Help - Month Beginning Month End Variable
    By Jonesey_MFC in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-15-2012, 11:13 AM
  7. [SOLVED] Default to beginning of month
    By Heather in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-22-2005, 05: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