Question: I need help writing this vba code 1. Write a sub which loops over the integers 1,2,....20. For each such value determine whether the number

I need help writing this vba code

1. Write a sub which loops over the integers 1,2,....20. For each such value determine whether the number is even or odd. Write to cells (,10) a string stating, for example " 12 is even" or "17 is odd". For this, you should use the CStr function to coerse the value of to a string and then concatenate it with the remaining clause. Also place in columns 11 and 12 the value of mod 3 and mod 5.

2. Write a sub in which the first two lines in the body of the sub activate Sheet2 and clear both the contents and formatting of the cells in the entire sheet. loop through the first 1000 rows in the workbook. If the row number is divisible by 3 then paint the interior of the cells in that row gray(160). if the remainder of the row number divided by 3 is 1 paint gray(220) and if it is 2 paint gray(190). Here gray(#) is not a function but short-hand for RGB.

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!