+ Reply to Thread
Results 1 to 2 of 2

Change column in formula based on drop down list

  1. #1
    Forum Contributor
    Join Date
    07-16-2012
    Location
    Fort Worth, Texas
    MS-Off Ver
    Excel 2010
    Posts
    378

    Change column in formula based on drop down list

    Hello,

    I have a SUMIF formula and I wonder if we can do this. For example, the formula is SUMIF(Table2[Customer],Summary!$A7,Table2[LW Sale]). Is there a way that I can use drop down list to choose either I want to modify part of the formula from Table2[LW Sale] to Table2[4W Sale], or Table2[YTD]? I want to build a template so it could give me a quick performance review for a time that I want to see under drop down.

    Please help and thanks

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Change column in formula based on drop down list

    hi tantcu. you probably know how much a sample excel file can help illustrate better. see if my attachment helps. i intentionally put everything in 1 sheet to see better. it's ok if your reference to Summary sheet is elsewhere.
    C7 is your original.

    C8 is using INDIRECT
    =SUMIF(Table2[Customer],Summary!$A8,INDIRECT("Table2["&B8&"]"))

    C9 is using INDEX & MATCH (much preferred as INDIRECT is volatile:
    =SUMIF(Table2[Customer],Summary!$A9,INDEX(Table2[[LW Sale]:[YTD]],,MATCH(Summary!B9,Table2[[#Headers],[LW Sale]:[YTD]],0)))
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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. Replies: 1
    Last Post: 04-12-2013, 06:27 PM
  2. [SOLVED] Dependent on drop down list column will change
    By shaf1234 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-14-2013, 08:42 AM
  3. [SOLVED] Change a cell based on a drop down list
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2012, 06:25 AM
  4. Change formula when selecting different names from drop down list
    By processchip in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-17-2011, 10:28 AM
  5. Replies: 3
    Last Post: 02-24-2008, 07:41 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