Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for VBA The user (me) will input two positive integers into cells C3 and C4 on Sheet1. Create a run button on Sheet1

This is for VBA

The user (me) will input two positive integers into cells C3 and C4 on Sheet1.

Create a run button on Sheet1 that executes a macro named problem1. This macro performs the following tasks:

Obtain the two integers A and B from cells C3 and C4 on Sheet1, then check is A is less than B. If A is greater than B, tell the user that A needs to be smaller than B via a message box then end the program.

Use a For loop to determine the sum of all even integers from A to B.

Use a For loop to determine the sum of all odd integers from A to B.

Use a For loop to determine the sum of all integers that are evenly divisible by 5 from A to 2*B

Output the smallest of the three sums to cell E6, the middle sum in cell E7, and the largest of the three sums to cell E8.

You may solve this problem by using as many For loops as you like, but do not use Do loops.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

How would you know a good solution if you saw it?

Answered: 1 week ago