I'm not sure you know about private threads... they can be found in the upper right corner of this page under "inbox".... can't remember if you get an invite email... toucan
I really appreciate your response. Can you point me to the specific website? If I am not able to find my answer, I will ask you again. What I was referred to, as an example, was in my VBA subroutine (office 2010 for Mac), if I wanted to calculate an error function (or say a lognormal function), my VBA program did not recognize that function, so I had to sent a number to Excel, used Excel function to compute that function, then fed it back to my VBA subroutine....So a relatively simple subroutine became quite a convoluted task. But for large do loops, iterative computation or Monte Carlo, hard to do that in pure Excel. Or, can I do them in Excel? Thank you.
Stackoverflow is a great place to get specific answers. Since you are on excel for Mac, it's a bit more challenging for the object model is not the same as a windows machine.
Yeah...that does convolute things! You can use WorksheetFunction. See this excellent site: http://www.cpearson.com/excel/callingworksheetfunctionsinvba.aspx See also: https://msdn.microsoft.com/en-us/library/office/hh211481(v=office.14).aspx Quote from http://www.cpearson.com/excel/callingworksheetfunctionsinvba.aspx : Code: Calling Worksheet Functions In VBA Nearly all worksheet functions can be called from VBA using the Application or Application.Worksheet objects. Excel functions that have native VBA equivalents, such as Month, are not available. The syntax of a worksheet function call is the same as worksheet function itself. For example, a worksheet function in a cell might be: =VLOOKUP(123,A1:C100,3,FALSE) To use code in VBA that does the same thing, you would use: Dim Res As Variant Res = Application.WorksheetFunction.VLookup(123,Range("A1:C100"),3,FALSE) The number of parameters and their meanings are the same when calling the function from VBA as they are when calling the function from a worksheet cell. As the code above is written, you will get a runtime error if the value 123 is not found in the range. Therefore, you need to put in some error trapping code: Dim Res As Variant On Error Resume Next Err.Clear Res = Application.WorksheetFunction.VLookup(123,Range("A1:C100"),3,FALSE) If Err.Number = 0 Then '''''''''''''''''''''''''''''''' ' Value was found. Continue normal code execution '''''''''''''''''''''''''''''''' Else '''''''''''''''''''''''''''''''' ' Value was not found. Error code goes here. '''''''''''''''''''''''''''''''' End If