Closed Thread
Results 1 to 15 of 15

Trying to Min max an input number in the positive and negative directions?

  1. #1
    Registered User
    Join Date
    10-03-2022
    Location
    Oakville, Ontario
    MS-Off Ver
    365
    Posts
    38

    Post Trying to Min max an input number in the positive and negative directions?

    f(x)=x^3 formula in excel

    Min max formula??
    Ideally with ^1.125 where negative input numbers are increased the larger the number (1^1.125=1, 10^1.125=13.33521432), and the same happens with positive numbers in the other direction.

    The question is how does one write this formula into excel? It has things on either side of the = sign. I'm trying to min/max a number as an output.
    For example
    -5 A1 = -25 B1
    +5 A2 = +25 B2
    -2 A3 = -4 B3
    +2 A4 = +4 B4
    -10 A5 = -100 B5
    +10 A6 = +100 B6

    Etc.


    Thanks
    Last edited by CVDom; 08-21-2023 at 11:05 AM.

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,433

    Re: Min max formula

    So be it!.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Min max formula

    OK so is there a question in there?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    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,907

    Re: Min max formula

    Probably yet another duplicate of this:

    https://www.excelforum.com/excel-for...-sequence.html

    I'm closing this thread - if it isn't the same question, the OP can contact me.
    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.

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

    Re: Min max formula

    Thread re-opened.

    Please add your question and give the thread a more informative title - your title should say what you are trying to o, nit how you think it should be done.

  6. #6
    Registered User
    Join Date
    10-03-2022
    Location
    Oakville, Ontario
    MS-Off Ver
    365
    Posts
    38

    Re: Min max formula

    The question is how does one write this formula into excel? It has things on either side of the = sign. I'm trying to min/max a number as an output.
    For example
    -5 A1 = -25 B1
    +5 A2 = +25 B2
    -2 A3 = -4 B3
    +2 A4 = +4 B4
    -10 A5 = -100 B5
    +10 A6 = +100 B6

    Etc.


    Thanks

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

    Re: Trying to Min max an input number in the positive and negative directions?

    Explain the logic and show us what you want. Attach a sample workbook.

  8. #8
    Registered User
    Join Date
    10-03-2022
    Location
    Oakville, Ontario
    MS-Off Ver
    365
    Posts
    38

    Re: Trying to Min max an input number in the positive and negative directions?

    Attachment 840300

    Depending on the input number along the X axis will output the corresponding output number. The sample workbook I have doesn't come close to this since I can't figure it out.

  9. #9
    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,907

    Re: Trying to Min max an input number in the positive and negative directions?

    That's a picture of a curve. I asked for a sample spreadsheet. Close, but no cigar ...

  10. #10
    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,907

    Re: Trying to Min max an input number in the positive and negative directions?

    A pure guess. In B1 copied down:

    =IF(A1<0,(A1^2)*-1,A1^2)

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    1
    -5
    -25
    2
    5
    25
    3
    -2
    -4
    4
    2
    4
    5
    -10
    -100
    6
    10
    100
    Sheet: Sheet1

  11. #11
    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,907

    Re: Trying to Min max an input number in the positive and negative directions?

    Any good?

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  12. #12
    Registered User
    Join Date
    10-03-2022
    Location
    Oakville, Ontario
    MS-Off Ver
    365
    Posts
    38

    Re: Trying to Min max an input number in the positive and negative directions?

    It works, thanks, but there's definitely a more mathematic way of doing it that I'm curious about.

  13. #13
    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,907

    Re: Trying to Min max an input number in the positive and negative directions?

    What do you mean by "more mathematical"? What's "less methematical" about what I have suggested? What doesn't it do that you need it to do?

    You are very cryptic in your responses! Is this a maths question or an Excel question?

  14. #14
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: Trying to Min max an input number in the positive and negative directions?

    I'm not sure if it is "more mathematical", but an alternative would be =SIGN(A1)*A1^2.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  15. #15
    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,907

    Re: Trying to Min max an input number in the positive and negative directions?

    So this was all about the other thread after all! Continue in the original thread.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 02-16-2018, 06:50 AM
  2. Replies: 11
    Last Post: 06-06-2014, 03:34 PM
  3. 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