+ Reply to Thread
Results 1 to 19 of 19

Referencing a formula with a dropdown menu

  1. #1
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Referencing a formula with a dropdown menu

    I have this Excel problem that's really giving me a hard time.

    [B]Link To The Google Sheet Problem Is Attached Below/B]

    I have two tables, the first is the transaction list table where i will determine the charges and profit for a particular transaction and the second is a transaction rate table where i will store the formula that will be used to calculate the Profit

    My intention is here is that i will like to input an amount (in the transaction list table) afterwards select a menu in the "Bill Type" column and that will use the corresponding formula stored in the "Rate (Transaction Rate table)" to determine the "Charges (Transaction List)" while the formula stored in the "ProFormula (Transaction Rate)" column will be used to calculate the "Profit (in the Transaction List table)"

    Now the problem i managed in the past to get this done but when i drag the formula down for use in other rows, the formula is not being dynamically referenced for use in other rows.
    Attached Files Attached Files
    Last edited by coja; 01-27-2023 at 09:41 PM.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Referencing a formula with a dropdown menu

    Is this an Excel problem or a Googlesheets problem?

    Which platform you you need it to work for?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Sir this is a google sheet problem and it has been headaches for me... I have tried using INDEX & MATCH and VLookUp function to solve this but i keep missing something i can seem to figure out

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Referencing a formula with a dropdown menu

    Some expected answers would also help.

  5. #5
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Ok here is some context, let's assume i inserted 30000 into the amount column and selected the "Withdraw" dropdown menu, this dropdown will reference the content stored in the cell Withdraw-Rate intersection (Transaction Rate table) which is

    =IFS(amount=0,"",
    amount<5001,100,
    amount<10001,200,
    amount<20001,300,
    amount<30001,400,
    amount<40001,500,
    amount<50001,600,
    amount<60001,700,
    amount<80001,800,
    amount<100001,900,
    amount<120001,1000,
    amount<150001,1100)

    Now because the amount = 30000, the Charges column (in the Transaction List table) will display "300" which falls within the range based on the stored formula.

    Then the Profit (transaction list table) will output "300" because if the formula

    =IFS(amount<20000,charge-(amount*0.55%),amount>19999,charge-100)

    stored in the "Withdraw-ProFormula Intersection (in the Transaction Rate table)"

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,022

    Re: Referencing a formula with a dropdown menu

    I will move this to the googleshhets sub-forum

  7. #7
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Alright please do i hope i am able to get help here.

  8. #8
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    Try putting the following formula in cell E9 and see if this is what you're after.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    I've amended the formula in E9 to clean things up a bit.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Thanks for the update.
    Let me try explaining what i am trying to achieve if that will help.

    The "Transaction Rate" table was created to store formulas which will be referenced dynamically by the rows in the "Transaction List" table.

    So lets say i entered an amount and selected an option (i.e. "Withdraw") in the dropdown menu, it will reference the formula in the "Withdraw x Rate" column of the "Transaction Rate" table to determine the "Charges" subsequently, this will also reference the formula in the "Withdraw X Proformula" "Transaction Rate" table to determine the "Profit" in the "Transaction List" table.

    I hope this explains what i am trying to achieve.
    Last edited by coja; 01-29-2023 at 06:44 AM.

  11. #11
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    I think I understand now. In your original link I put an ArrayFormula in cell D9 and E9 which will calculate the Charges and Profit for all rows. I also replaced the Transaction Rate table with a Charge table on the Charges tab. Hopefully this is what you're after.

  12. #12
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Great work sir, you're extremely close to exactly what i am trying to achieve. Your recent update is an eye opener for me and i have already started watching tutorials on the XLookUp Function.


    =ArrayFormula(if(B9:B="","",IF(C9:C="Withdraw",XLOOKUP(B9:B,Charges!A3:A14,Charges!B3:B14,,1),IF(C9:C="Transfer",XLOOKUP(B9:B,Charges!A3:A14,Charges!B3:B14,,1),IF(C9:C="Airtime",1.5%,3.5%)))))

    Noticed from the above formula, you combined Airtime & Data together but i will like to separate them in other to make this calculations for determining the profit.

    The formular
    =ArrayFormula(IFERROR(if(B9:B>0,IFS(amount<20000,charge-(amount*0.55%),amount>19999,charge-100),""),""))
    which we currently have in the "PROFIT" column is exclusively used for determining the calculation for the "Withdraw" option

    So to calculate the profit for:

    "Transfer" option, we will use: =IFS(amount>0,charge-30,amount=0,"")

    "Deposit "option, we will use: =charge (this will just echo the value in the charge column as profit)

    "Airtime" option, we will use: =amount*1.5%

    "Data" option, we will use: =amount*3.5%

    I hope you get what i am driving at sir, each selected option will have it's own specific formula for determining the profit.

  13. #13
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    Have another look at cell E9 in your original sheet. I redid the formula and I think this will achieve what you want.
    I also changed the formula in D9 so it's not dependent on the rate sheet which you will no longer need.
    Last edited by Flyboy65; 01-30-2023 at 05:16 PM. Reason: Additional information

  14. #14
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    OOps, can you help me with the previous solution, what we currently have now is totally different from what i am trying to achieve.

    The previous version was EXTREMELY close (depending on the RATE slide). I have been watching tutorials on this and i think i can attempt to work on it.

    Kindly help with what we have before this recent changes you made.

    Thanks...
    Last edited by coja; 01-31-2023 at 07:48 PM.

  15. #15
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    I've gone back to the previous solution which I hope you can work with. Part of the issue was that you changed some of the charge rates as we went along. In any case, with the details that you've provided, this should work for you. Good luck.

  16. #16
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Thanks for the help so far sir,

    I will like to do one more thing here. I have created a sub table beside the "POSAcc" table.

    The goal here is to determine the total sum generated by each options selected in the "Bill Type" column.

    I tried illustrating what i want to achieve in the excel.

    Thanks...

  17. #17
    Forum Contributor
    Join Date
    12-17-2013
    Location
    ON, Canada
    MS-Off Ver
    MS 365
    Posts
    171

    Re: Referencing a formula with a dropdown menu

    See the new formula in H9.

  18. #18
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Thanks sir,

    It worked like a charm... Thanks

  19. #19
    Registered User
    Join Date
    01-27-2023
    Location
    lagos, Nigeria
    MS-Off Ver
    Office 365
    Posts
    10

    Re: Referencing a formula with a dropdown menu

    Kindly note, this update requested here are cosmetic, although i have achieved exactly what i want, just wanna know if they can be achieved.

    1. In the "Charges" column, i noticed if i select either "Airtime" or "Data", the charge is written as "0" instead of "1.5%" and "3.5%" respectively.

    2. In the "amount" column, if i clear all the value entered, i want the "Bill Type" selection to revert to "Empty Selection". So i decided to create an additional option but left it empty. So if value is not entered into the amount column, it should revert to this.

    Thanks...
    Last edited by coja; 02-03-2023 at 12:21 PM.

+ 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. dropdown menu fill after selection first dropdown menu
    By starchaser_one in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-21-2021, 02:58 PM
  2. Using Dropdown Menu to adjust Xlookup formula
    By Tim418 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-22-2020, 11:10 PM
  3. [SOLVED] make dropdown menu dependent on other dropdown menu values
    By kosherboy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-30-2015, 04:29 PM
  4. Dropdown Menu with formula
    By MysticGenius in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-15-2011, 06:43 AM
  5. Replies: 2
    Last Post: 08-31-2011, 11:26 AM
  6. Using Formula to activate a dropdown menu
    By petenickless in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-03-2007, 12:04 PM
  7. [SOLVED] Referencing Dropdown Menu in macro
    By FuadsCurse in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-02-2005, 05:06 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