Question: Hi, can you please write VBA code in excel for a function that can compare two different values? IF the values are within 1% of

Hi, can you please write VBA code in excel for a function that can compare two different values? IF the values are within 1% of each other, which verifies that they are approximately equal so the value is good, then I want the code to continue to use the value in further calculations, ELSE display some sort of error message.

For context, I am comparing the roots obtained for a non-linear equation that were found using two different root-finding methods. I just want to verify that both methods are giving the same result before proceeding with imputing them into further calculations.

Thank you! Please let me know if you require any further information or additional context.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!