![]() ![]() You need to run the macro repeatedly to complete the data arrangement in the table as given below. Your macro for arranging the data is ready. You can see that the active cell is B5 and the next data set will be placed here. Delete the rows B6 – B11 and click in the cell B5. ![]() The first data set is arranged in the first row of the table. is the current row number – the 3 rows above it.Ĭut the cells B5, B6, B7, B8 and B9 and paste it in the cells C4 to C8 respectively. Give a meaningful name, say, DataArrange to the macro. The first step in arranging the above given data is to define the data format in a table with headers.Ĭreate the row of headers as shown below. In order to let the macro recorder know that it has to use relative references, do the following − The macro needs to use relative references, as you will move down the rows while arranging the data. The solution is to record a macro so that you can complete the task in not more than a few seconds. It becomes a mundane task not allowing you to focus on technical things It takes substantial amount of time to arrange the data from the 280 constituencies ![]() ![]() If you attempt to arrange the given data in the above format − Therefore, arrange the data in a table as shown below. It is not possible to analyze the data in the above format. The data is provided to you in a worksheet as given below. For each constituency, the following details are collected − Suppose you are required to analyze the data of voters collected from 280 constituencies. Such macros will be useful if you have to repeat the steps at various places in the worksheet. That’s why it’s called recording in relative mode.Relative reference macros record an offset from the active cell. Select any other cell (for example, cell D4) and run the recorded macro.Įxcel places the words relative to the initial selected cell. First, select any single cell (for example, cell B8).Ĩ. Solution: record the macro in relative mode.Ģ. This would make the macro much more flexible. Wouldn’t it be nice to place these words anywhere on the sheet automatically? Not just Range(“B3:B5”). Select any cell on the sheet and run the recorded macro.Ī macro recorded in absolute mode always produces the same result. To record a macro in absolute mode, execute the following steps.Ģ. If you don’t know how to record a macro, we highly recommend you to read this example first. However, sometimes it is useful to record macros in relative mode. By default, Excel records macros in absolute mode. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |