Modulo-K counter. Consider the following worksheet that forms a modulo-K counter with the K value specified in A5. The clear value in E4 equals 1 when the counter Q values are equal to the K value in A5. The VBA Macro Input_Counter assigned to the arrow increments the input count in A2 and clears the input count when Clear equals 1.

a. What is the Excel formula in C2?

b. What is the Excel formula in D2?

c. What is the Excel formula in E2?

d. What is the Excel formula in F2?

e. What is the Excel formula in E4?

f. Compose the VBA Macro Input_Counter.


Solution



Sub Input_Counter()



Range("A2").Value = Range("A2").Value + 1



If Range("E4").Value = 1 Then



Range("A2").Value = 0



End If

End Sub

Trades & Technology

You might also like to view...

The most common method used to join bell-and-spigot cast-iron pipe fittings is _____.

a. a compression joint b. mechanical c. flange d. socket welding

Trades & Technology

John unloaded 2.5 loads of wheat on the floor of a large building. The wheat was in a cone-shaped pile 32 feet in diameter and 9.75 feet high. How many bushels of wheat were in the pile? (Note: 1 bu = 1.25 ft3.)

What will be an ideal response?

Trades & Technology

A tanker truck carrying liquid herbicide overturned and caused a spill over a field. The liquid herbicide remained on the soil for 30 min before evaporating into the air. The mass diffusivity of the liquid herbicide in the soil is 2 × 10?8 m2/s. If a concentration of 0.1 percent by weight will destroy most life, determine the depth of the soil at which plant and insect life is likely to be affected by the spill.

What will be an ideal response?

Trades & Technology

Power in an RC circuit can be measured as:

A) reactive power (Pr). B) apparent power (Pa). C) true power (Ptrue). D) all of these.

Trades & Technology