Results 1 to 5 of 5

Sort 3 textboxes to get an order for a specific formula

Threaded View

stielo Sort 3 textboxes to get an... 10-26-2015, 11:29 AM
walruseggman Re: Sort 3 textboxes to get... 10-26-2015, 12:08 PM
stielo Re: Sort 3 textboxes to get... 10-27-2015, 04:35 AM
walruseggman Re: Sort 3 textboxes to get... 10-27-2015, 08:39 AM
stielo Re: Sort 3 textboxes to get... 10-27-2015, 10:24 AM
  1. #1
    Registered User
    Join Date
    10-26-2015
    Location
    Belgium
    MS-Off Ver
    2013
    Posts
    36

    Sort 3 textboxes to get an order for a specific formula

    Hi,
    I'm fairly new to VBA programming and I stumbled upon a problem concerning sorting my data from textboxes from small to big and use them in a formula to calculate the girth of a box. (Girth formula is [(adding 2 smallest dimension)*2+largest dimension])

    The problem is, I keep having an error sorting my data before i can even use this formula. What I have now is:


     Dim W As Variant
        Dim D As Variant
        Dim H As Variant
        Dim Small1 As Variant
        Dim Small2 As Variant
        Dim Small3 As Variant
    
    W = TextBox41.Value
    D = TextBox40.Value
    H = TextBox39.Value
    
     Small1.Value = Application.Small("W,D,H", 1)
     Small2.Value = Application.Small("W,D,H", 2)
     Small3.Value = Application.Small("W,D,H", 3)
    TextBox58.Value = ((Small1.Value + Small2.Value) * 2) + Small3.Value

    Thanks for helping. I've already been searching for this for about a week at the moment (and about 1 day on this forum).
    Last edited by stielo; 10-27-2015 at 10:25 AM. Reason: Solved

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula to Sort the Data in Descending Order
    By Ankit_Kumar in forum Excel General
    Replies: 8
    Last Post: 04-27-2015, 07:48 AM
  2. [SOLVED] Dynamic formula for specific numbering order
    By JO505 in forum Excel General
    Replies: 14
    Last Post: 03-07-2015, 01:13 AM
  3. Need formula to follow a specific order, please help.
    By Darker0ne in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-09-2014, 04:43 AM
  4. [SOLVED] Sort specific visible sheets in an order according to cells in each sheet
    By Comisar in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-14-2013, 06:57 PM
  5. Replies: 4
    Last Post: 03-14-2013, 09:14 PM
  6. Automatically Generate Order Form based on Textboxes
    By emzipoo4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2012, 04:21 PM
  7. [SOLVED] Set tab order for textboxes
    By Sandy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-28-2005, 09:30 AM

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