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

VBA error for fixing gas composition if the summation is not 100 % #491

Open
wennanlong opened this issue Oct 13, 2022 · 0 comments
Open

Comments

@wennanlong
Copy link
Collaborator

wennanlong commented Oct 13, 2022

Reference can be zero. Please add an if statement for reference = 0 to cover the divide by zero cases.

       For R = 0 To 6
            If Results.Range("G36").Offset(R, i).Interior.Color = RGB(0, 155, 118) Then
                If Reference = 0 Then
                    Results.Range("G36").Offset(R, i).Value = 0
                Else
                    Results.Range("G36").Offset(R, i).Value = Results.Range("G36").Offset(R, i).Value / Reference
                End If
            End If
        Next R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant