+ Reply to Thread
Results 1 to 6 of 6

How to have the formula add or subtract 1 year in a Index -Aray formula

Hybrid View

  1. #1
    Registered User
    Join Date
    02-24-2017
    Location
    Renton, WA
    MS-Off Ver
    2016
    Posts
    3

    How to have the formula add or subtract 1 year in a Index -Aray formula

    Hi there,

    I created this formula a few years back, and I'm trying to update it. The last section that ends with it looking at $C$3 is the area I want to update. I want it to be able to Add 1 or Subtract 1 to the Year it is looking up/referencing.

    Currently I've created another cell with the different years, but this gets old when you have to change the formula at the new year. Any ideas would be greatly appreciated.

    =INDEX('Purcap Storage'!$H$3:$H$10000,MATCH(1,('Purcap Storage'!$E$3:$E$10000='Store SWAS'!$A$3)*('Purcap Storage'!$D$3:$D$10000='Store SWAS'!$E$3)*('Purcap Storage'!$B$3:$B$10000='Store SWAS'!$M$29)*('Purcap Storage'!$A$3:$A$10000='Store SWAS'!$C$3),0))

    Thanks for your time.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,939

    Re: How to have the formula add or subtract 1 year in a Index -Aray formula

    What's in 'Store SWAS'!$C$3?
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    02-24-2017
    Location
    Renton, WA
    MS-Off Ver
    2016
    Posts
    3

    Re: How to have the formula add or subtract 1 year in a Index -Aray formula

    In that field is the year 2016 currently. I want the formula to add or subtract 1 year from it though.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,939

    Re: How to have the formula add or subtract 1 year in a Index -Aray formula

    =YEAR(NOW()) in C3 will always have the current year.

  5. #5
    Registered User
    Join Date
    02-24-2017
    Location
    Renton, WA
    MS-Off Ver
    2016
    Posts
    3

    Re: How to have the formula add or subtract 1 year in a Index -Aray formula

    Thats awesome! I will use that code. I guess I should be more specific to what I was trying for though. The formula I use looks up information from 1 sheet to another from Feb - Jan is the year cycle. So my problem is in the Jan formula area I have to have a different year cell in order for it to work.

    This is why I was trying to find out how to tell the formula that I want it to either add a year or subtract a year, depending on it's location.

    For example Feb-Dec 2016 but when it gets to Jan the formula needs to read for 2017 and they are part of the same "year" at work.

    Hope that helps? So I'm wanting to eliminate trying to use a different cell and just use the one cell. Is there a way to do that? Thanks in advance!!

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,939

    Re: How to have the formula add or subtract 1 year in a Index -Aray formula

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to Quick Post button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!

+ 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] Help with Index matching - formula worked last year but not now
    By lwilt in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-24-2017, 10:43 AM
  2. [SOLVED] Difference Formula or Hiding the - sign with a subtract formula.
    By JonWilf in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-19-2016, 01:37 PM
  3. Need help with VLOOKUP or INDEX/MATCH with Subtract formula
    By drheenas in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2014, 07:14 PM
  4. Aray formula and Zeros
    By cdscivic in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-15-2013, 02:24 PM
  5. [SOLVED] Include Year and Month in a INDEX Formula
    By trizzo in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 02-11-2013, 01:36 PM
  6. [SOLVED] Formula to use to subtract 2 cells in a row and put the same formula for over 1000 rows
    By milk1one in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2012, 12:08 AM
  7. Formula question-formula to subtract multiple cells
    By arrchapman in forum Excel General
    Replies: 3
    Last Post: 04-17-2008, 04:13 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