I have two curves as shown in the attached file. The first one is a two-point straight line. The second is a series of straight lines. The missing values in the second one to be interpolated.

I need the total area between the two lines, the areas above and below to be returned separately. The area is also bounded by vertical lines through the end points of the first line.

Area-between-two-curves.xlsx

I need the total area between the two lines, the areas above and below to be returned separately. The area is also bounded by vertical lines through the end points of the first line.

Area-between-two-curves.xlsx

The step width is set to 0.001, which is a compromise between accuracy and calculation time.

The yellow areas are named ranges, used in the program.

Area-between-two-curves.xlsm

Easy to see that is wrong, when you point me in the right direction :)

A small modification restricts the calculation to the line range.

To have the non filled cells in the range, I revised the file I send.

Area-between-two-curves-A.xlsm

## Premium Content

You need an Expert Office subscription to comment.Start Free Trial