+ Reply to Thread
Results 1 to 4 of 4

Extract quadratic equation a, b, c values from given equation

  1. #1
    Registered User
    Join Date
    01-10-2020
    Location
    Panevezys, Lithuania
    MS-Off Ver
    2019
    Posts
    2

    Extract quadratic equation a, b, c values from given equation

    Hello everyone,

    Can someone help me figure out formula so that I can extract quadratic a, b, c values from given equation?

    1st. Example: x^2-11x+30=0. Formula should output a:1, b:11, c = 30.

    2nd Example: 2x^2+3x+1=3. Formula should output a:2, b:3, c = -2.

    Much help is appreciated.

    P.S. I'm attaching my excel sheet.
    Attached Files Attached Files
    Last edited by Ciklopaz; 01-11-2020 at 02:05 PM.

  2. #2
    Forum Contributor
    Join Date
    11-20-2007
    Location
    Felixstowe, England
    MS-Off Ver
    Excel 2013, 2019
    Posts
    217

    Re: Extract quadratic equation a, b, c values from given equation

    I've had a quick go ... I'm sure there are much more elegant ways to do it, but this (or actually these) solutions are what came to mind immediately. I've done 2 versions, as the first solution resulted in blank for no term, and didn't convert to values, so the second set is to the right of the first. See attached:
    Attached Files Attached Files

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Extract quadratic equation a, b, c values from given equation

    You can parse your formula with these functions.

    In B3

    =IF(FIND("x2",A3)=1,1,INT(LEFT(A3,FIND("x2",A3)-1)))

    In C3

    =INT(IF(MID(A3,FIND("x2",A3)+2,FIND("x",A3,FIND("x2",A3)+2)-FIND("x2",A3)-2)="+",1,MID(A3,FIND("x2",A3)+2,FIND("x",A3,FIND("x2",A3)+2)-FIND("x2",A3)-2)))

    In D3

    =MID(A3,FIND("x",A3,FIND("x2",A3)+2)+1,FIND("=",A3)-FIND("x",A3,FIND("x2",A3)+2)-1)

    You can then use the standard formula for extracting the roots
    Martin

  4. #4
    Registered User
    Join Date
    01-10-2020
    Location
    Panevezys, Lithuania
    MS-Off Ver
    2019
    Posts
    2

    Thumbs up Re: Extract quadratic equation a, b, c values from given equation

    Thanks for yours time, but mrice formula is more elegant. Thanks again for helping me out!

+ 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. Both quadratic and logarithmic equation fit the data.
    By Statisticum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-20-2017, 04:14 PM
  2. [SOLVED] Quadratic Equation Question
    By ChemistB in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-23-2014, 01:46 PM
  3. Quadratic Equation in VBA
    By vop2311 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-09-2014, 10:19 PM
  4. [SOLVED] Finding the Coefficients of a Quadratic Equation using VBA
    By kyleg222 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-26-2012, 10:38 AM
  5. How to determine factor A, B, C of quadratic equation
    By utanvn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2012, 07:29 AM
  6. solve quadratic equation system
    By Miguel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2005, 10:06 AM
  7. Quadratic equation
    By Nes in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-11-2005, 10:52 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