Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6850203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:05:43+00:00 2026-05-27T01:05:43+00:00

We need to create a custom formula for users to pull data from our

  • 0

We need to create a custom formula for users to pull data from our mysql database. After the user is authenticated, they would type in a formula in excel (something like ‘=retrievemybirthday(“Frank Dodge”)’. How do we go about doing that? We’re not new to programming, just new to programming w/ Excel. Are there any tutorials on this? We’ve looked but can find anything.

thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:05:43+00:00Added an answer on May 27, 2026 at 1:05 am

    1) you need an ODBC driver configured for your MySQL db.

    2) figure out the SQL code you need for this function, something like

    select birthdate
    from YourTable
    Where membername=?
    

    You will use this code in your function

    3) In your function, you will need the correct Connection String. Check a site like http://www.connectionstrings.com/

    4) Here’s an example of a function, using ActiveX Data Objects (you need a reference set in Tools > References in the VB Editor)

    Function GetNomen(sPN As String) As String
    'SkipVought/2006 Mar 7
    '--------------------------------------------------
    ' Access: DWPROD.FRH_MRP.READ
    '--------------------------------------------------
    ':this function returns nomenclature for a given part number
    '--------------------------------------------------
    '2011-9-26 Converted to Parameter Query
    '--------------------------------------------------
    
        Dim sConn As String, sSQL As String, sServer As String
        Dim rst As ADODB.Recordset, cnn As ADODB.Connection, cmd As ADODB.Command
    
        Set rst = New ADODB.Recordset
        Set cnn = New ADODB.Connection
        Set cmd = New ADODB.Command
    
        sServer = "dwprod"
        cnn.Open "Driver={Microsoft ODBC for Oracle};" & _
                   "Server=" & sServer & ";" & _
                   "Uid=/;" & _
                   "Pwd="
    
        sSQL = "SELECT PM.Nomen_201 "
        sSQL = sSQL & "FROM FRH_MRP.PSK02101 PM "
        sSQL = sSQL & "WHERE PM.PARTNO_201 =?"
    
    
        Debug.Print sSQL
    
       With cmd
            .CommandText = sSQL
            .CommandType = adCmdText
            .Prepared = True
    
            .Parameters.Append .CreateParameter( _
                Name:="PARTNO_201", _
                Type:=adChar, _
                Direction:=adParamInput, _
                Size:=16, _
                Value:=sPN)
    
            .ActiveConnection = cnn
    
            Set rst = .Execute
        End With
    
        rst.MoveFirst
    
        If Err.Number = 0 Then
            GetNomen = rst("NOMEN_201")
        Else
            GetNomen = ""
        End If
    
        rst.Close
        cnn.Close
    
        Set cmd = Nothing
        Set rst = Nothing
        Set cnn = Nothing
    End Function
    

    You can run this function on the sheet as requested.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to create a custom membership user and provider for an ASP.NET mvc
I'm trying to create a custom control by deriving from a ZedGraphControl I need
I need to create a custom TextBox control that allows user input HTML tags.
I need to create custom urls for my users, for ex: www.example.com/alpha, www.example.com/beta. I
I need to create a custom Contains LINQ expression that derives from System.Linq.Expressions.Expression that
I need to create a custom route for a WCF data service that contains
I need to create a custom token that can fetch a value from a
I need create custom dialog and put JPanel into it. Is it possible?
Why do we need to create custom exceptions in .NET?
Need to create a custom DNS name server using C which will check against

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.