+ Reply to Thread
Results 1 to 5 of 5

Formula to show current and previous months data

  1. #1
    Forum Contributor
    Join Date
    06-11-2008
    MS-Off Ver
    2003
    Posts
    220

    Formula to show current and previous months data

    Please see attached.

    I am wanting to put formulas into cell O7 and P7. So at the moment O7 should be showing yellow and P7 should be showing red. However when it comes to filling in sep-01 (say as an example - green) i then want O7 to show green being the most current month and P7 to be showing yellow.

    I have a formula for this when it comes to showing numbers - here is an example for current month -
    =AVERAGE(OFFSET(C149,0,MATCH(-1,C149:N149,-1)-1,1,-1))

    So thought it would be possible to do this for text too?

    ANy help appreciated.

    CHeers,
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Formula to show current and previous months data

    Are you actually working on 2001 data?

    You might be able to use HLOOKUP
    Attached Files Attached Files
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    06-11-2008
    MS-Off Ver
    2003
    Posts
    220

    Re: Formula to show current and previous months data

    2001 was just an example. Unfortunatly if i was to delete "green" in k7, the current month then shows zero, when i would need it to be showing "yellow" and previous month should be showing "red". Thats why i wondered whether the formula i already have could be altered in some way?!

    Thanks for your response!!

  4. #4
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: Formula to show current and previous months data

    If you are able to arrange your data vertically, the following should work. It might be possible to do this without the helper column I added, but I thought this was a better idea.
    Let me know if this works for you!
    Attached Files Attached Files

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Formula to show current and previous months data

    Quote Originally Posted by dandavis1 View Post
    2001 was just an example. Unfortunatly if i was to delete "green" in k7, the current month then shows zero, when i would need it to be showing "yellow" and previous month should be showing "red". Thats why i wondered whether the formula i already have could be altered in some way?!

    Thanks for your response!!
    My example needs you to enter the current month in the cells above the table, it then selects the selected month and the one prior to taht

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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