Question

In: Computer Science

discuss the purpose of using macros in an Excel worksheet. Include the following: 1) An example...

discuss the purpose of using macros in an Excel worksheet. Include the following:

1) An example of an instance where a user would find the creation of a macro useful.

2) An example of an instance where a user would not find the creation of a macro useful.

Solutions

Expert Solution

A macro can be defined as the recording of a series of tasks. It’s the simplest form of automation – show a software program the steps you follow to get something done, and the software will follow along. When used right, macros can save you hours by automating simple, repetitive tasks.

1)
COMPARING STRINGS

It is not uncommon to compare strings in a macro. For instance, you may need to compare what a user typed with some pre-determined value. If you do this directly, you must take into consideration that the user may not have typed his (or her) string in the same way as you expected. Particularly vexing is the fact that the user may have mixed upper and lower case in their response.

The quickest and easiest way around this is to use either the UCase() or LCase() function on their input before you do the comparison. For instance, let's assume you prompt the user for the word "yes" to verify they want an action done. The following code will check the input, regardless of how the user typed it.

If LCase(sUserIn) = "yes" then bDoIt = True
The trick is make sure your test string is either all upper or all lower case, and then convert the user's input to that same case.


2)
Keep your macros small and specific to the tasks at hand. The bigger the macro, the slower it runs, especially if it’s required to perform many functions or calculate a lot of formulas in a large spreadsheet. Also, if you combine all the tasks into one long macro and it fails, it takes forever to locate the point of failure. If you run each macro separately, you can quickly review the results and verify accuracy.


Related Solutions

What is the purpose of the "adjustment" of the Trial Balance worksheet? Using any example from...
What is the purpose of the "adjustment" of the Trial Balance worksheet? Using any example from your textbook, outline why the adjustment was made and what impact did it have on the Trial Balance.
Please answer each question set on a separate Excel worksheet, labeled appropriately and include excel Formulas...
Please answer each question set on a separate Excel worksheet, labeled appropriately and include excel Formulas Question Set 1. You are in charge of quality control for computer monitors at Dell. You have data on twenty-five batches of monitors, tracking five types of defects: brightness, color, contrast, dead pixels, and stuck pixels. These data are given in the table below. 1. For each defect type, find the average number of defects per batch. So, you should have an average defect...
Chapter 13: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and...
Chapter 13: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and enter formulas in all cells that contain question marks. For example, in cell C22 enter the formula "= B10". Note: The present value factors could be computed using the built-in Excel function PV, but we recommend using the formulas in Appendix 13B. Verify that your worksheet matches the example in the text. Check your worksheet by changing the discount rate to 10%. The net...
Chapter 9: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and...
Chapter 9: Applying Excel: Excel Worksheet (Part 1 of 2) Download the Applying Excel form and enter formulas in all cells that contain question marks. For example, in cell B30 enter the formula "= B20". Notes: In the text, variances are always displayed as positive numbers. To accomplish this, you can use the ABS() function in Excel. For example, the formula in cell C31 would be "=ABS(E31?B31)". Cells D31 through D39 and G31 through G39 already contain formulas to compute...
Exercise 1: The example exercise is to work through a loan amortization example using Excel. Open...
Exercise 1: The example exercise is to work through a loan amortization example using Excel. Open Activity 3-Workbook. Go to Exercise 1 worksheet. The example loan conditions are (enter these values under Loan Terms):                                                             Loan amount borrowed (principal or pv) $100,000                                                             Loan interest (rate) is 7.5%                                                             Loan term (number of payments or nper) is 9 years                                                             Annual payments of principal and interest       Calculate the annual loan payment in cell C7 using the PMT function in...
Explain the purpose of the Worksheet and describe four tips for finding errors on the worksheet.
Explain the purpose of the Worksheet and describe four tips for finding errors on the worksheet.
Briefly discuss the purpose of each of the following. Give one brief example of each.: a....
Briefly discuss the purpose of each of the following. Give one brief example of each.: a. Tests of controls b. Analytical procedures c. Tests of details of balances
Please answer each question set on a separate Excel worksheet, labeled appropriately. (Include all formulas) Question...
Please answer each question set on a separate Excel worksheet, labeled appropriately. (Include all formulas) Question Set 1. You are in charge of quality control for computer monitors at Dell. You have data on twenty-five batches of monitors, tracking five types of defects: brightness, color, contrast, dead pixels, and stuck pixels. These data are given in the table below. 1. For each defect type, find the average number of defects per batch. So, you should have an average defect rate...
Discuss the purpose of a switch below:    1. Benefits of using a switch    2....
Discuss the purpose of a switch below:    1. Benefits of using a switch    2. Types of switches    3. How is a switch used in a network infrastructure
Question 2 REQUIRED: (1) Complete the following partial worksheet. (9 marks) (2) Using your worksheet information,...
Question 2 REQUIRED: (1) Complete the following partial worksheet. (2) Using your worksheet information, prepare closing entries (for December 31 of the current year) in the journal paper on the next page. Note: Explanations are NOT required. (3) Assuming the journal entries prepared in part (2) have been posted, prepare a Post-Closing Trial Balance (on the next page). Hint: you may find it helpful to use a T-account for calculating Capital. account titles adjusted trial balance    income statement statement...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT