How to Write a Book
Q&A for How to Write a Simple Macro in Microsoft Excel
Coming soon
Search
-
QuestionIf I have two lines of dates in one cell, how do I delete the first line?Community AnswerDouble click on the cell, or click the cell and then F2. Then, delete the part that you don't need. If you want to do this on a large number of cells on the same column, then select the column, click "DATA" on the top menu, click on "Text to Columns," and try the different options to divide the data there. (There are too many to list here.) You can divide by commas, spaces, dashes, periods, etc., or specify the length. Make sure the columns on the right are empty; the divided data will split into those columns.
-
QuestionWhile recording a macro, will it record something I want done outside of Excel, such as opening up a website and clicking on things in that website?Community AnswerNo. The macro program in Excel is limited to Excel. Once you use an outside program, Excel will be unable to record what you are doing.
-
QuestionHow do I secure files in Excel?Community AnswerClick the Microsoft Office button, point to Prepare, and then click Encrypt Document. In the Password box, type a password, and then click OK. In the Reenter Password box, type the password again, and then click OK. To save the password, save the file.
-
QuestionHow do I write a micro to clear out cells?Community AnswerFirst, open an excel working book. Then enter data on Sheet 1 at A1:C10. Press Alt+F10 to open VBA Editor. Insert a module for insert menu. Copy the above code and paste in the code window. Save the file as a macro enabled working and press F5 to run it.
-
QuestionWhat do I do if my macros are disabled in MS Excel?Community AnswerIf you are using a PC from work, that may be a safety feature from your IT department to prevent malicious code from affecting your PC or your network, and only they can modify it. I'd recommend getting in touch with the IT department first.
-
QuestionHow do I write a macro so that instead of the macro going to a specific cell it needs to go to a blank cell in a specific column?Community AnswerRecorded macro may not capture logic to identify the blank cells as it capture all cursor movements and may end up selecting the specific cells only. However we may amend the part of code to get the desired result. In the above code we may replace ActiveCell with Range("C65000").End(xlUp).Offset(1, 0) to get such result. Range("C65000").End(xlUp).Offset(1, 0) will be interpreted by the macro recorder as below: 1. Place the cursor on “C65000” assuming we wouldn’t have data beyond that point. 2. then moves upward as we would expect by Ctrl + Home and select the last filled row in that column. 3. and finally offset one row down to find the next available row.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit