Hello,

I would like some help with the following.

I'm working on an assignment in VBA code.

The results must be calculated from a set of numbers. The calculation starts with 1 and then it goes on with ½ + ¼ + 1/8 + 1/16.....
So the assignment is: Calculate 1 + ½ + ¼ + 1/8 + 1/16.....
Ask the user through msgbox beforehand how many terms must be calculated.

What is the best way to write this code?

With kind regards,

Peter