Question

In: Accounting

Excel allows one to automate routine tasks by recording/writing macros. Please discuss how to create macros...

Excel allows one to automate routine tasks by recording/writing macros. Please discuss how to create macros and discuss their relevance/usefulness in the accounting world. Can you provide a chart/graph and explanation?

Solutions

Expert Solution

Answer-:

One of the more powerful, but seldom used functions of Excel is the ability to very easily create automated tasks and custom logic within macros. Macros provide an ideal way to save time on predictable, repetitive tasks as well as standardize document formats – many times without having to write a single line of code.

Macros are incredibly powerful and can do pretty much anything your imagination can conjure. As a (very) short list of functions you can do with a macro:

  • Apply style and formatting.
  • Manipulate data and text.
  • Communicate with data sources (database, text files, etc.).
  • Create entirely new documents.
  • Any combination, in any order, of any of the above.

Steps to creating a macro-:

We start with your garden variety CSV file. Nothing special here, just a 10×20 set of numbers between 0 and 100 with both a row and column header. Our goal is to produce a well formatted, presentable data sheet which includes summary totals for each row.

As we stated above, a macro is VBA code, but one of the nice things about Excel is you can create/record them with zero coding required – as we will do here.

To create a macro, go to View > Macros > Record Macro.

Assign the macro a name (no spaces) and click OK.

Once this is done, all of your actions are recorded – every cell change, scroll action, window resize, you name it.

There are a couple of places which indicate Excel is record mode. One is by viewing the Macro menu and noting that Stop Recording has replaced the option for Record Macro.

The other is in the bottom right corner. The ‘stop’ icon indicates it is in macro mode and pressing here will stop the recording (likewise, when not in record mode, this icon will be the Record Macro button, which you can use instead of going to the Macros menu).

Now that we are recording our macro, let’s apply our summary calculations. First add the headers.

Next, apply the appropriate formulas (respectively):

=SUM(B2:K2)
=AVERAGE(B2:K2)
=MIN(B2:K2)
=MAX(B2:K2)
=MEDIAN(B2:K2)

Now, highlight all the calculation cells and drag the length of all our data rows to apply the calculations to each row.

Once this is done, each row should display their respective summaries.

Now, we want to get the summary data for the entire sheet, so we apply a few more calculations:

Respectively:

=SUM(L2:L21)
=AVERAGE(B2:K21) *This must be calculated across all data because the average of the row averages does not necessarily equal the average of all the values.
=MIN(N2:N21)
=MAX(O2:O21)
=MEDIAN(B2:K21) *Calculated across all data for the same reason as above.

Now that the calculations are done, we will apply the style and formatting. First apply general number formatting across all the cells by doing a Select All (either Ctrl + A or click the cell between the row and column headers) and select the “Comma Style” icon under the Home menu.

Next, apply some visual formatting to both the row and column headers:

  • Bold.
  • Centered.
  • Background fill color.

And finally, apply some style to the totals.

When all is finished, this is what our data sheet looks like:

Since we are satisfied with the results, stop the recording of the macro.

Congratulations – you have just created an Excel macro.

Thankyou...


Related Solutions

To automate the sales system in Excel, what are processing tasks that could be automatically performed...
To automate the sales system in Excel, what are processing tasks that could be automatically performed when an invoice is accepted?
PLEASE ANSWER IN EXCEL FORMAT THAT IS EASILY UNDERSTOOD ONLY, THANK YOU!! (no writing please) [EXCEL]...
PLEASE ANSWER IN EXCEL FORMAT THAT IS EASILY UNDERSTOOD ONLY, THANK YOU!! (no writing please) [EXCEL] Percent of sales: Cattail Corporation's financial statements for the fiscal year just ended are shown below: Cattail Corporation Income Statement Net Sales: $1500 Costs: $350 Net Income: $1150 Balance Sheet Assets $700 = $700 Debt $600 Equity 100 = $700 Cattail management expects sales to increase by 14 percent next year. Assume that the financial statement accounts vary directly with changes in sales and...
Please answer in excel only. How do I create the graphs in excel and show the...
Please answer in excel only. How do I create the graphs in excel and show the data. Discuss the following two cost functions: TC=20+4Q TC=20+2Q+0.5Q^2 a) Calculate all cost curves and plot these curves on graphs. Total Cost Total Fixed Cost Total Variable Cost Average Total Cost Average Fixed Cost Average Variable Cost Marginal Cost b) In each case, indicate the point at which diminishing returns occur. (For question a), compute the required costs and plot the curves for quantities...
Excel Task 1 & 2 (due week 6): Please submit both tasks together on one pdf...
Excel Task 1 & 2 (due week 6): Please submit both tasks together on one pdf document. Do not forget to highlight your answers. Q. Purchasing Department cost drivers, simple regression analysis Fashion Flair operates a chain of 10 retail department stores. Each department store makes its own purchasing decisions. Barry Lee, assistant to the president of Fashion Flair, is interested in better understanding the drivers of Purchasing Department costs. For many years, Fashion Flair has allocated Purchasing Department costs...
Please create a meme for how you’re coping with the COVID-19. Discuss one of the following:...
Please create a meme for how you’re coping with the COVID-19. Discuss one of the following: An unethical product and which marketing standards were violated. How would you fix it? Please discuss HR practice in place at your organization. How are they doing in regards to standards for dealing with harm?
Please create an Excel file with the calculated answers to the questions to the Excel homework...
Please create an Excel file with the calculated answers to the questions to the Excel homework for this week. The questions are listed in the attached PDF file.   Please also go over the Excel file attached to this assignment in order to familiarize yourself with the different ways Excel can be used to solve Time Value of Money problems when multiple cash flows are involved. There are three worksheets in the Excel file. This Excel file with examples is just...
, Excel allows us to create our own formulas and functions to perform calculations and solve...
, Excel allows us to create our own formulas and functions to perform calculations and solve problems within the spreadsheet. Which of the functions or formulas that you experimented with in Presentation 1 did you find the most valuable? How do you think this particular function will save time in using Excel spreadsheets? What other functions do you think you will use on a regular basis? Why? Explain. Was there a function that is new to you?
Create a circuit that allows the client to add numbers one by one into a register...
Create a circuit that allows the client to add numbers one by one into a register file (8 four-bit registers) by inputting: 1) the number itsself 2) the memory location The circuit can be logic gates OR verilog code. whichever you prefer! Thank you and I will rate!
Create a circuit that allows the client to add numbers one by one into a register...
Create a circuit that allows the client to add numbers one by one into a register file (8 four-bit registers) by inputting: 1) the number itsself 2) the memory location The circuit can be logic gates OR verilog code. whichever you prefer! Thank you and I will rate!
Using the appropriate function or routine in excel Consider attending one of the following two colleges...
Using the appropriate function or routine in excel Consider attending one of the following two colleges as a full-time student. One is a public university with low tuition, while the other is a prestige university (they are both in the same city, so housing costs should be equal for each). Suppose you qualify for a partial scholarship at the private university. The financial information corresponding to attending each school is as follows. Public university ​ Private University Tuition and related...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT