Results 1 to 7 of 7

Vba function

Threaded View

  1. #1
    Registered User
    Join Date
    08-29-2019
    Location
    Lisbon, Portugal
    MS-Off Ver
    2020
    Posts
    8

    Question Vba function

    Hello,
    I need a VBA funcion that does the following:

    function teta(Q, d, i, Ks)
    n1 = 0.05
    Q1 = Ks * (1/8)(n1-sin(n1))*(d^2)*(1/4)(1-(sin(n1)/n1))*d*i^(1/2)*(1000/60)
    
    If Q1<Q
      n2 = n1 +0.05
      Q2 = Ks * (1/8)(n2-sin(n2))*(d^2)*(1/4)(1-(sin(n2)/n2))*d*i^(1/2)*(1000/60)
    endif
    
    If Q3<Q
      n2 = n2 +0.05
      Q3 = Ks * (1/8)(n3-sin(n3))*(d^2)*(1/4)(1-(sin(n3)/n3))*d*i^(1/2)*(1000/60)
    Endif
    
    .....
    If Qn-1<Q
      nn = nn-1 +0.05
      Q3 = Ks * (1/8)(nn-sin(nn))*(d^2)*(1/4)(1-(sin(nn)/nn))*d*i^(1/2)*(1000/60)
    Endif 
    
    If Qn>=Q
     Else
      teta = nn
    ENDIF
    END Funtion
    Thanks for the help.
    Last edited by Pepe Le Mokko; 08-30-2019 at 11:06 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. COUNTUNIQUE Function in Google Sheets; Excel lacks a direct counterpart to this function?
    By PivotTablePSHomage in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-18-2018, 05:27 AM
  2. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  3. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  4. Replies: 13
    Last Post: 04-08-2014, 05:46 AM
  5. Replies: 1
    Last Post: 03-21-2012, 11:22 AM
  6. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  7. [SOLVED] Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 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