Results 1 to 3 of 3

Dividing 2 texboxes to show result in 3rd textbox

Threaded View

  1. #1
    Registered User
    Join Date
    03-08-2015
    Location
    england
    MS-Off Ver
    10
    Posts
    12

    Dividing 2 texboxes to show result in 3rd textbox

    Hi
    I hope someone can help me with the issue i have
    I am building up a new user form where i have few textboxes in which i can type in the values and i have another 2 textboxes where i receive result (Textbox 16 &17) with using the formula ( See below )
    Now i need to divide them 2 texboxes and show the result in to textbox 15
    I was trying to apply same statement which i used for getting the result to textbox 16 & 17 but its not working
    I would be grateful if someone can help me to resolve this issue.

    Dim dblTextBox2 As Double           'this will do the calculation for colour corrected values
    Dim dblTextBox3 As Double
    Dim dblTextBox4 As Double
    Dim dblTextBox5 As Double
    If TextBox2.Value <> "" Then dblTextBox2 = CDbl(TextBox2.Value)
    If TextBox3.Value <> "" Then dblTextBox3 = CDbl(TextBox3.Value)
    If TextBox4.Value <> "" Then dblTextBox4 = CDbl(TextBox4.Value)
    If TextBox5.Value <> "" Then dblTextBox5 = CDbl(TextBox5.Value)
    If dblTextBox2 > 0 And dblTextBox3 > 0 Then TextBox13.Value = Format(100 / 10 ^ (2 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox3 / 0.9216))), "0.0")
    If dblTextBox2 > 0 And dblTextBox4 > 0 Then TextBox14.Value = Format(100 / 10 ^ (2 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox4 / 0.9216))), "0.0")
    If dblTextBox2 > 0 And dblTextBox5 > 0 Then TextBox16.Value = Format(100 / 10 ^ (3.18 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox5 / 0.9216))), "0.0")
    If dblTextBox2 > 0 And dblTextBox4 > 0 Then TextBox17.Value = Format(100 / 10 ^ (3.18 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox4 / 0.9216))), "0.0")
    End Sub

    Dim dblTextBox2 As Double           ' to valculate T550 (corrected)
    Dim dblTextBox4 As Double
    If TextBox2.Value <> "" Then dblTextBox2 = CDbl(TextBox2.Value)
    If TextBox4.Value <> "" Then dblTextBox4 = CDbl(TextBox4.Value)
    TextBox14.Value = 100 / 10 ^ (2 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox4 / 0.9216)))
    If dblTextBox2 > 0 And dblTextBox4 > 0 Then TextBox14.Value = Format(100 / 10 ^ (2 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox4 / 0.9216))), "0.0")
    If dblTextBox2 > 0 And dblTextBox4 > 0 Then TextBox17.Value = Format(100 / 10 ^ (3.18 / dblTextBox2 * WorksheetFunction.Log(100 / (dblTextBox4 / 0.9216))), "0.0")
    End Sub
    Last edited by lukasz_W; 03-17-2015 at 04:35 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Dividing the result of 2 VLOOKUP Formula's
    By JohnDoh in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 03-16-2015, 07:05 AM
  2. [SOLVED] calculation from 2 texboxes to be automatically shown in 3rd textbox
    By lukasz_W in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2015, 04:39 PM
  3. Using Listbox selection to show specific labels and texboxes on userform
    By jlwiii34 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-17-2013, 03:17 PM
  4. [SOLVED] howto: sum textbox values and show result in textbox9
    By Lkivagten in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-09-2012, 08:08 AM
  5. Multiplying then dividing the result of the multiplication
    By cbaker1615 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 08-08-2010, 04:09 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