![]() ![]() Now go to Insert option under Developer tab which is just beside the Design Mode option. This will allow us to design different tabs without affecting the written code. For this go to the Developer tab and click on Design Mode as shown below. We can assign the written code to a button where can directly click and run the code instead of running the code in by select the macro. Now, Run the code using F5 key or click on the play button which is located below the menu bar of VBA Application window as shown below.Īs we can see in the above screenshot, the output of VBA Coding is coming as 1.4. This will allow cell C3 to take the range of respective cells from -2 and -1 limit. Now select the reference cell as Range where we will the output with Range(“C3”).Select. Now Mod reference cell -2 and -1 are considered as cell A1 and cell B1 respectively as shown below.ĪctiveCell.FormulaR1C1 = "=MOD(RC,RC)" Now select an active cell where we need to see the result by ActiveCell.FormulaR1C1 as cell C1. ![]() By this, we will be able to differentiate the name of Marco sequence. Here we have named the macro subcategory as VBA_MOD1. ![]() After that go to insert menu and select Module to open a new module. Press Alt + F11 to go in VBA coding mode. For this, we will see a decimal number and find how MOD. There is another way to calculate the MOD in VBA. We will see the output of 12 Mod 5 as 2 which is the remainder obtained after dividing 12 by 5. Once done, run the complete code by using F5 key or clicking on the play button as shown below. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |