Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allowing CONF passed without quotes from Excel Cell #5

Open
GoogleCodeExporter opened this issue Aug 7, 2015 · 1 comment
Open

Comments

@GoogleCodeExporter
Copy link

This may be just my pet peeve, but I am not a fan of having to enter the quotes 
around "M" for CONF in the Excel cell for my OPERT call.  Following code 
inserted in OPERT function before the original "On Error Goto 16" will allow me 
to enter the CONF argument without quotes:

    'following allows conf to be entered without quotes
    Dim sformula As String
    Dim commaPos As Integer, parenPos As Integer

    If IsError(conf) Then
        'if it's an error value, get the entry in the formula
        sformula = Application.Caller.Formula

        'return position of 3rd comma
        commaPos = InStr(1, sformula, ",")
        commaPos = InStr(commaPos + 1, sformula, ",")
        commaPos = InStr(commaPos + 1, sformula, ",")

        'return end of formula to capture 4th argument
        parenPos = Len(sformula)

        conf = Mid(sformula, commaPos + 1, parenPos - commaPos - 1)
    End If

Original issue reported on code.google.com by [email protected] on 27 Jul 2011 at 1:02

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant