Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions