+ Reply to Thread
Results 1 to 7 of 7

Dynamic Excel Formula Based on Another Cell Value

  1. #1
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Post Dynamic Excel Formula Based on Another Cell Value

    Hello,
    excel dynamic formula.jpeg

    I want to change my formula which is the selected cell in the D column, based on criteria that can be selected from the green underlined cell in the B column. These criteria are related to data in the red-underlined column in the formula. Here is the question. When I select different criteria from my "Kriter" dropdown list, I want to change the formula to automatically corresponds to the related column address. For example, "AltBölge" option is related to H2:H cells while other options are related to A2:A or B2:B.

    This

    =ÇOKEĞERSAY(Veri!F2:F;"HEDEF";Veri!H2:H;C13)

    should turn automatically to this:

    =ÇOKEĞERSAY(Veri!F2:F;"HEDEF";Veri!A2:A;C13)


    Note: =ÇOKEĞERSAY equals to =SUMIFS

    Thanks in advance

  2. #2
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,410

    Re: Dynamic Excel Formula Based on Another Cell Value

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Administrative Note

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. Thanks.
    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.

  3. #3
    Registered User
    Join Date
    03-17-2019
    Location
    Madrid
    MS-Off Ver
    2017
    Posts
    12

    Re: Dynamic Excel Formula Based on Another Cell Value

    Not necessary to upload the worksheet actually. (Simplifying it is a huge issue.)

    I want to change dynamically the column reference in a formula based on another cell value.

    Example:

    Let assume F1 is Criteria Cell.

    If F1 is "gender" then;
    =SUMIFS(A2:A;"old";B2:B;"male")

    If F1 is "marital status" then;
    =SUMIFS(A2:A;"old";C2:C;"married")

    How I can get these automatically updated functions?

    Thanks

  4. #4
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Taiwan
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,380

    Re: Dynamic Excel Formula Based on Another Cell Value

    @furkanyasar

    COUNTIFS FUNCTION


    Try formula

    HTML Code: 
    Last edited by wk9128; 10-10-2021 at 11:13 AM.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    Re: Dynamic Excel Formula Based on Another Cell Value

    ÇOKEĞERSAY is actually COUNTIFS not SUMIFS.

    Do you have headers on the Veri sheet that match the values in the criteria cell?

  6. #6
    Valued Forum Contributor Haluk's Avatar
    Join Date
    02-14-2019
    Location
    Turkiye
    MS-Off Ver
    2010 - 64 Bit on Windows-11 (22 H2) 64 Bit
    Posts
    1,147

    Re: Dynamic Excel Formula Based on Another Cell Value

    Quote Originally Posted by furkanyasar View Post

    ......
    ....

    Note: =ÇOKEĞERSAY equals to =SUMIFS

    @Furkan;

    The function "ÇOKEĞERSAY" is "COUNTIFS" in English version.

    Try to use this formula;

    Please Login or Register  to view this content.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Dynamic Excel Formula Based on Another Cell Value

    What other choices are you likely to have in the criteria cell (F1). If you have more than 2 then you could use an INDEX function to determine which column to search through, and if the criteria (i.e. Male, Married etc.) is linked to the drop-down choice in a table then you could return that through a VLOOKUP formula, so your formula would basically be:

    =COUNTIFS(A:A,"old",INDEX_to_return_range,VLOOKUP_to_return_criteria)

    Hope this helps.

    Pete

+ 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. Dynamic file name change within a Formula based on a Cell contents name.
    By super5200 in forum Excel Formulas & Functions
    Replies: 25
    Last Post: 03-20-2021, 01:32 PM
  2. [SOLVED] Formula - get the value from other sheet based on dynamic cell value
    By dpatel in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-12-2017, 08:13 AM
  3. Dynamic cell formula based on quantity entry
    By MICowboy13 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-21-2015, 11:11 AM
  4. Dynamic cell range based on a formula
    By mljs54 in forum Excel General
    Replies: 1
    Last Post: 10-20-2011, 09:59 AM
  5. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  6. Replies: 0
    Last Post: 02-28-2006, 09:10 PM
  7. Replies: 0
    Last Post: 02-28-2006, 09:10 PM

Tags for this Thread

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