+ Reply to Thread
Results 1 to 7 of 7

Needing help with a dynamic formula

  1. #1
    Registered User
    Join Date
    06-17-2014
    Location
    Hendersonville, TN
    MS-Off Ver
    2016
    Posts
    14

    Needing help with a dynamic formula

    Hi,
    I am needing some help building a formula using a separate data source. For each profit center in column A there are 14 rows of data, but the profit center # is only listed on the first row. Then each column beginning with D is the monthly data. I need to look up the profit center and give me the 2019 forecast for each month which would be in row #6 and then beginning with column #3. Please see the attached file for a sample layout of the data source. (NOTE: I cannot copy down the profit center # because this file is updated almost daily from our sales managers & I have to pull it down from our corp site weekly).

    I have used the below formula and it works PERFECTLY, except for when I close the data source file.
    =OFFSET(INDEX('[2019 Natl Accts Forecast.xlsx]Dollar General'!$D:$D,MATCH($E8,'[2019 Natl Accts Forecast.xlsx]Dollar General'!$A:$A,0)),6,4,1,1)*1000

    Once I close the file I then get #Values. I realize it's because I'm using OFFSET.

    So I then changed to the below formula, but it only gives me the data on the row where the profit center # is and doesn't march down 6 rows.
    =INDEX('[2019 Natl Accts Forecast.xlsx]TOTAL MAY'!$A$3:$O$602,MATCH(E7,'[2019 Natl Accts Forecast.xlsx]TOTAL MAY'!$A$3:$A$602,0),MATCH(S7,'[2019 Natl Accts Forecast.xlsx]TOTAL MAY'!$A$3:$O$3,0))*1000

    What options do I have to tell the formula to get the exact cell of data I need?

    Thank you for your help!
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Needing help with a dynamic formula

    May be add 6 to MATCH() result for row.

    =Index(Array,Match()+6,Match())
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    06-17-2014
    Location
    Hendersonville, TN
    MS-Off Ver
    2016
    Posts
    14

    Re: Needing help with a dynamic formula

    Thanks for the quick reply. Are you adding the +6 to the 2nd formula? If so, I just tried that and Excel says I have too many arguments.

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Needing help with a dynamic formula

    Hmm? in index function you supply array, then row# and column# to obtain result (which is what Match() function does).

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


    There is no additional argument supplied to the formula as MATCH result + 6 is evaluated before it's supplied to INDEX.

  5. #5
    Registered User
    Join Date
    06-17-2014
    Location
    Hendersonville, TN
    MS-Off Ver
    2016
    Posts
    14

    Re: Needing help with a dynamic formula

    That worked!!!

    However, you'll notice I have the 2nd Match looking up S7 which is a cheater column I created for the months and I really don't want that cheater column in my report file.

    The 1st formula worked exactly how it should have without a cheater column, but because it uses OFFSET the data goes to #Values when I close the data source. Is there a way to fix either formula or is my best bet to use the 2nd one and create a cheater column for the months?

    I hope that all makes sense.

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,887

    Re: Needing help with a dynamic formula

    I'm not sure what you mean by cheater column...

    Do you mean that you want to use hard coded value for column location like you did in OFFSET?
    i.e. =INDEX(Array,MATCH()+6,4)

  7. #7
    Registered User
    Join Date
    06-17-2014
    Location
    Hendersonville, TN
    MS-Off Ver
    2016
    Posts
    14

    Re: Needing help with a dynamic formula

    In my report file where the formula is housed, I had to create a column that has the months in it. That's what the 2nd Match S7 (MATCH(S7,'[2019 Natl Accts Forecast.xlsx]TOTAL MAY'!$A$3:$O$3,0))*1000) is looking at in order to find the proper month in the data source. I'm sorry for the confusion, it's hard to describe. I'd like to do away with that "extra" column, but I don't think it's possible.

    Thank you so much for your help on this.

+ 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. Needing help on an if than formula
    By midwest trader in forum Excel General
    Replies: 5
    Last Post: 12-05-2016, 07:50 PM
  2. New and needing a lil help - dynamic monthly values
    By anonitachi in forum Hello..Introduce yourself
    Replies: 4
    Last Post: 02-10-2015, 06:00 AM
  3. [SOLVED] Needing to set a limit in an IF formula
    By jnelson83 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-15-2013, 06:11 AM
  4. [SOLVED] Needing an logical if formula
    By jt1561 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-15-2013, 05:39 PM
  5. Formula needing help with. (IFs, ANDs, ORs)
    By stacey52891 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-09-2013, 10:37 AM
  6. novice needing help on formula
    By jordiman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-18-2009, 08:25 AM
  7. [SOLVED] Needing simple formula
    By Connie Martin in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-25-2006, 10:10 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