d. What is the purpose of the numbers in cells A8:A147 of the spreadsheet? The numbers in these cells act as a reference number for these transactions that make it easier to look up for later use.
e. Here is the macro attached to the Bottom button of this spreadsheet. Explain what’s wrong with this macro, what will go wrong in the spreadsheet as a result, how the macro should be changed, and why that change solves the problem. Sub ToVisaBottom() Worksheets(“Visa”).Range(“A102”).Select End Sub This macro hardcodes the “bottom” of the worksheet. It will not work because as changes, additions, and deletions are made, the actual bottom of the worksheet will continuously change. As a result, clicking on this button may take you to the bottom of the current version of the worksheet, but in a later version with modification this may not be the bottom of the worksheet anymore. The simplest way to fix this macro is to work from the bottom up to find the last cell that contains something. The maximum number of rows able to be stored in a spreadsheet is 65, 536. Then for the macro we could write: Sub ToVisaBottom() Bottom = Range("A65536").End(xlUp).Row Cells(Bottom, 1).Activate End Sub 62. Macros. a. Give one reason why you might want to write a macro in a situation where you could just use a formula instead. If you need to use the macro for similar situations, you might want to attached the script to a button so that it can be run repeatedly, instead of having to put the same formula in multiple cells, b. Besides the fact that we just like to name things, why is it better to have a named range of cells in a macro rather than a range with cell references?
You've reached the end of your free preview.
Want to read all 6 pages?
- Spring '14