+ Reply to Thread
Results 1 to 13 of 13

How to modify a formula using a value in one column that then impacts on two others

  1. #1
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    How to modify a formula using a value in one column that then impacts on two others

    Hey everyone! I'm new here but (I think) better than the average normal person at excel. Macros still confuse me, and I'm not sure what is the best solution for this problem. I'm trying to write a formula that will run different calculations of a cell range (only one number in each cell) depending on what is entered in a main cell. There are about 5 different formulas that I'm looking to input. The general idea is this:

    Cell A - Text Entry (which determines which of the 5 formulas are run - these formulas will take the number inputs in cells B,C)
    Cell B - Number entry
    Cell C - Second number entry
    Cell D - Output of Formula (determined by Cell A)

    I've run several nested IF functions to test this, but I keep running into issues because I want the output to vary based on the text entry of Cell A.
    Last edited by AliGW; 02-08-2022 at 01:43 PM. Reason: Title changed - please think more carefully about your thread titles in future!

  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,978

    Re: Formula help

    Welcme to the forum.

    Your thread title is not satisfactory - I will change it for you once you have clearly explained what you want help with.

    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. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.

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

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.
    Last edited by AliGW; 02-08-2022 at 01:25 PM.
    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
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Formula help

    You could use something like this in cell D:

    Please Login or Register  to view this content.
    Put the five possible text entries in the {"A","B","C","D","E"} array then put the five possible formulas in the various slots (coloured above).

    WBD
    Office 365 on Windows 11, looking for rep!

  4. #4
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    Re: Formula help

    This would allow Cell D to be the output of the formula determined by cell A using the values in Cells B,C?

  5. #5
    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,978

    Re: Formula help

    OK - HaCohen - you have completely ignored my post.

    No further help to be offered in this thread until the OP has responded with the details I have requested regarding the problem that needs solving.


    Thanks.

  6. #6
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    Re: Formula help

    I'm sorry, I wasn't ignoring your post. I'm not sure how else you would like me to explain what I'm asking for help about. That is what the post is about. I'm tyring to figure out how to have numerical data from cells b and c be modified by a formula that can vary based on the text input in cell a.

  7. #7
    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,978

    Re: Formula help

    OK - that is clearer, but please be aware that you need to use descriptive thread titles in future. You can probably guess how many thousands of queries we have from people here every month wanting 'formula help'. I hope you get my drift.

    Administrative Note:

    Your thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I will change it for you this time.)

    The help may now continue - thanks.
    Last edited by AliGW; 02-08-2022 at 01:44 PM.

  8. #8
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    Re: Formula help

    Thank you! Sorry for any confusion!

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to modify a formula using a value in one column that then impacts on two others

    I feel that WBD's formula will generally work for your situation.
    If you would like to see how to specifically apply it to your data, then please utilize the information in the banner at the top of the page to upload an .xlsx file with your next post.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  10. #10
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    Re: How to modify a formula using a value in one column that then impacts on two others

    Quote Originally Posted by JeteMc View Post
    I feel that WBD's formula will generally work for your situation.
    If you would like to see how to specifically apply it to your data, then please utilize the information in the banner at the top of the page to upload an .xlsx file with your next post.
    Let us know if you have any questions.
    Thanks for that! I guess my confusion is where to input the formulas in order to have them match up with. Below is what I'm working with

    WM =-(B3/C3)/100
    S =(100/C3)*B3
    O/U =-(100/C3)*B3
    ML+ =(B3/C3)*100
    ML- =-(100/C3)*B3

    Those are the formulas I would be using with corresponding data input on the left (assuming the variable number I would put in are in the B,C cell columns.

  11. #11
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to modify a formula using a value in one column that then impacts on two others

    Assuming the five possible text entries for cell A3 are "WM","S","O/U","ML+" and "ML-" try the following:
    =CHOOSE(MATCH($A3,{"WM","S","O/U","ML+","ML-"},0),-(B3/C3)/100,(100/C3)*B3,-(100/C3)*B3,(B3/C3)*100,-(100/C3)*B3)
    Let us know if you have any questions.

  12. #12
    Registered User
    Join Date
    02-08-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    16

    Re: How to modify a formula using a value in one column that then impacts on two others

    Thanks everyone! Worked like a charm.

  13. #13
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: How to modify a formula using a value in one column that then impacts on two others

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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: 3
    Last Post: 03-24-2020, 07:27 AM
  2. Replies: 3
    Last Post: 01-10-2019, 09:34 AM
  3. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  4. Replies: 8
    Last Post: 09-22-2017, 05:41 AM
  5. Excel formula bar to display the result of the formula , not the formula?
    By max_max in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-18-2016, 07:15 PM
  6. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  7. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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