+ Reply to Thread
Results 1 to 5 of 5

Help with three calculation in one cell

  1. #1
    Registered User
    Join Date
    10-31-2014
    Location
    Fresno,CA
    MS-Off Ver
    2010
    Posts
    23

    Unhappy Help with three calculation in one cell

    Hello,

    I really apologize if this is a re-post, I have a problem I have been fighting with for two days now, and I have read and searched but cannot seem to find the exact answer I need for my situation.

    I am trying to figure out how to multiply a set of number from two different cells (B2*B3) then add a set of numbers from two different cells (B1+B5)and add the results from those two together(650+898), then multiply another set of cells (B2*B4)take the end results from both previous actions and subtract them from one another (1548-2799)and finally divide that answer(1251/2799)by the result from the last to cells that were multiplied. This reads very confusing so I hope the illustration helps. Thanks in advance.


    B2*B3 = 650
    B1+B5 = 898

    Total: 1548

    Then
    B2*B4 = 2799-1548

    = 1251


    Lastly: 1251/2799

    Answer: 45%


    Thanks again

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

    Re: Help with three calculation in one cell

    Try this:

    =((B2*B4)-(B2*B3+B1+B5))/(B2*B4)

    Format the cell as %age.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-31-2014
    Location
    Fresno,CA
    MS-Off Ver
    2010
    Posts
    23

    Re: Help with three calculation in one cell

    Thanks Pete!! that worked great! I tried placing this formula in a user form i created and i am getting a "Variable not defined" error highlighting the MOQ in the first line of code would you have any idea why i'm getting this error?

    Option Explicit
    Private Sub CalculateButton_Click()
    WithFee = ((MOQ * Retail) - (MOQ * Price + Fee + Shp) / (MOQ * Retail))
    NoFee = ((MOQ * Retail) - (MOQ * Price + Shp) / (MOQ * Retail))

    End Sub
    Private Sub CloseFormButton3_Click()
    CheckProduct.Hide

    End Sub

    Private Sub ResetButton_Click()
    Unload CheckProduct
    CheckProduct.Show

    End Sub

    Private Sub txtWithFee_Change()

    End Sub

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

    Re: Help with three calculation in one cell

    Well, what is MOQ (or Retail, Fee, Shp for that matter)?

    Pete

  5. #5
    Registered User
    Join Date
    10-31-2014
    Location
    Fresno,CA
    MS-Off Ver
    2010
    Posts
    23
    Quote Originally Posted by Pete_UK View Post
    Well, what is MOQ (or Retail, Fee, Shp for that matter)?

    Pete
    That is just the names of the txt boxes that the data is entered into on the userform.

+ 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: 1
    Last Post: 06-29-2015, 01:32 PM
  2. [SOLVED] Update Cell with result of calculation from another cell
    By Gorbs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-22-2014, 11:04 AM
  3. Place value in cell through calculation of a cell and userform entry
    By zg825 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 11:04 AM
  4. Clear cell content based on another cell calculation
    By zozo23 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-21-2012, 03:10 PM
  5. Add an amount from a calculation to a cell with a calculation (Sample attached)
    By aiwnjoo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2010, 10:41 AM
  6. Replies: 2
    Last Post: 07-03-2009, 03:24 PM
  7. Replies: 3
    Last Post: 08-15-2006, 09:15 AM

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