No: OpenText Fortify is an application-security product family, not a macro recorder, and its standard tools do not record mouse or keyboard actions in Excel. If you want to automate repeated spreadsheet steps, use Excel’s built-in macro recorder; if you want to assess software for security weaknesses, Fortify may be relevant, depending on the product and the code being analyzed.
What Fortify refers to
Fortify is the name of a set of application-security products now associated with OpenText. Tools in the family are used to find and manage security issues in software. Fortify Static Code Analyzer, for example, analyzes source code for potential vulnerabilities, while Fortify on Demand provides application-security testing services. These are different jobs from recording a sequence of actions in a spreadsheet.
A macro recorder observes supported actions in an application and turns them into instructions that can be replayed. A static code analyzer examines program code. The similar-sounding idea of “analyzing code” does not make a code scanner an automation recorder: Fortify is not designed to watch you format cells, copy data, or create a chart and then repeat those steps on demand.
Fortify product capabilities and supported languages can vary by product, edition, configuration, and release. Do not assume that a particular Fortify scanner accepts Excel VBA projects or can certify a workbook as safe. Check the current language-support documentation for the exact Fortify product and version, and treat any scan as one part of a security review—not as proof that a file is harmless.
What Excel’s macro recorder does
Excel’s recorder converts many actions performed in the workbook into Visual Basic for Applications (VBA) instructions. For example, you can record selecting a range, applying a number format, adding a border, and fitting the column width. Excel then saves a macro that can repeat those recorded operations. You can replay it from the Macros dialog, attach it to a button, or assign a shortcut.
The recorder is useful when the task is repetitive and the steps are reasonably consistent. It is not a general-purpose screen recorder. It captures supported Excel commands rather than a video of your screen, and it does not automatically understand your intent. A recorded instruction may target the same cells every time, even if the next month’s data has a different number of rows.
For example, recording formatting for A1:D25 may reproduce that formatting on the same range later. It will not necessarily detect that a future report extends to row 40. That difference—repeating literal actions versus handling changing data—is the key consideration when deciding whether a recorded macro is enough or whether the VBA needs editing.
How to record a macro in Excel for Microsoft 365
In Excel for Microsoft 365 on Windows, enable the Developer tab if it is not visible: go to File > Options > Customize Ribbon, select Developer under Main Tabs, and choose OK. Then record a simple macro as follows:
- Save a working copy of the workbook first. If the macro must be stored in the workbook, plan to save it as an Excel Macro-Enabled Workbook (.xlsm).
- Open Developer > Code > Record Macro. In the dialog, give the macro a name without spaces. Choose where to store it: This Workbook is suitable when the macro belongs with this file.
- Optionally add a description or shortcut. Avoid assigning a shortcut that you rely on for a normal Excel command, because a macro shortcut can take precedence while the workbook is open.
- Perform only the actions you want repeated. Use the worksheet and ribbon as you normally would, but remember that the recorder may capture selections and fixed ranges as well as the formatting or data changes you intended.
- Choose Developer > Code > Stop Recording. Test the macro on a copy or disposable sample before using it on important data.
If Developer is already visible, there is no need to change ribbon settings. To run a recorded macro, open Developer > Code > Macros, select it, and choose Run. Excel can also let you assign a macro to a worksheet button, which can be easier for colleagues than asking them to remember a shortcut.
On Excel for Mac, enable Developer through Excel > Settings > Ribbon & Toolbar (the pane may be called Preferences in older versions), then use the Developer tab’s recording and macro commands. Some VBA features and operating-system interactions differ between Windows and Mac, so a macro that relies on Windows-only components may not work on a Mac. Excel for the web does not create, run, or edit VBA macros; use the desktop app for those tasks.
Relative references, fixed cells, and repeatable work
Excel’s Use Relative References option changes how recorded selections are interpreted. With relative references off, a recorded action may refer to a specific location, such as selecting cell B2. With the option on, actions can be recorded in relation to the starting selection, which is helpful when you want to apply the same sequence to different rows or columns. The control is on the Developer tab in the Code group in Windows Excel.
Suppose you want to apply a format to each selected row. A macro recorded while selecting a particular range may keep targeting that range. A relative-reference recording can make the action move with the starting cell, but it does not automatically identify the last populated row or decide which records qualify. Those requirements usually need logic added to VBA or a different approach.
Before recording, decide whether the macro should always affect the same cells or work from the current selection. Also consider whether the workbook’s layout is stable. If a report’s columns move, a macro that refers to column C may affect the wrong field even though it runs without an error. Clear naming, a short description, and a test using representative data make recorded macros easier to maintain.
What a recorder cannot do well
Recorded VBA often contains more steps than a person would write by hand. It may include selecting a cell before changing its value, because that is how the action was performed. That is acceptable for a small, stable task, but it can make a macro fragile when users change the active sheet, insert rows, rename tabs, or rearrange a report.
A recorder also cannot infer business rules. If you record deleting rows that currently appear blank, the macro may not know how to distinguish a genuinely empty row from one with a formula returning an empty string. If the task is “keep only overdue orders with a balance,” you need to define those conditions explicitly; simply recording a manual cleanup once does not create a dependable rule for later files.
For robust automation, a developer may revise the generated VBA to use variables, loops, conditions, and explicit worksheet references. If code is involved, save a separate copy before running it: VBA macros cannot be undone with the normal Undo command. On Windows, Undo is Ctrl+Z; on Mac, it is Command+Z. Those shortcuts do not reverse changes made by a macro, so a backup is the safer recovery plan.
Security: macros and Fortify are not substitutes
VBA macros can change workbook contents and, depending on their code and environment, interact with files or other applications. Treat an unexpected workbook containing macros with caution. Do not enable macros merely because a file asks you to, and do not treat a familiar-looking filename or sender display name as proof of trust. Confirm the source through a reliable channel when a macro-enabled file is unexpected.
On Windows, Excel’s macro controls are available under File > Options > Trust Center > Trust Center Settings > Macro Settings. Organizations may enforce settings centrally, and Office may block macros in files from the internet. Follow your organization’s policy rather than weakening protections to make an unknown workbook run. A workbook that needs a macro for legitimate work should come from a trusted source and be reviewed through the appropriate process.
Fortify does not replace these user and device protections. A Fortify scan, where applicable to the code and product configuration, is aimed at identifying software security issues; it is not a guarantee that a workbook’s macro is benign, nor a reason to run an untrusted file. Conversely, a macro recorder helps create automation but does not inspect the resulting code for security problems. These tools solve separate problems.
Alternatives when recording is not the right fit
For recurring spreadsheet tasks, choose the simplest method that handles the actual requirement. A macro is not always the best choice, especially if the goal is just to clean, summarize, or share data.
- Excel formulas: Useful when results should update as source values change and the task is calculation or classification rather than a sequence of interface actions.
- Power Query: Useful for importing, combining, and reshaping data through repeatable transformation steps. It is often more maintainable than a macro for routine data preparation.
- Office Scripts: A web-oriented automation option for supported Microsoft 365 environments. Availability and capabilities depend on the account and platform; it is not the same thing as VBA recording.
- VBA written or refined by a developer: Appropriate when a task needs conditions, error handling, changing ranges, or integration beyond what a simple recording handles.
- Fortify: Consider it when the question is application-security testing of supported software code—not when the goal is to record and replay Excel actions.
For example, if a monthly workbook needs the same colors and number formats, a recorded macro may be quick. If the monthly source file has varying row counts and must be filtered, combined, and reshaped consistently, Power Query may be a better fit. If a task has to run across multiple applications or trigger from a business process, investigate an automation platform that supports those requirements instead of expecting Excel’s recorder to control every screen.
Frequently Asked Questions
Does Fortify have a macro recorder?
No standard OpenText Fortify product is an Excel-style macro recorder. Fortify is used for application-security testing and related work, not for recording spreadsheet clicks and replaying them.
Can Fortify scan Excel VBA macros?
Do not assume that it can. Language and file support depend on the particular Fortify product and release. Check the official support information for your version and ask your security team how VBA should be reviewed.
Where is Record Macro in Excel 365?
On Windows, use Developer > Code > Record Macro. If Developer is missing, enable it under File > Options > Customize Ribbon. Excel for Mac has a Developer tab too, though its settings path differs.
Why is my recorded macro affecting the wrong cells?
The recording may contain fixed cell references or selections, or it may rely on the active sheet and starting cell. Check whether relative references were appropriate, review the recorded steps, and test against a copy with a different-sized data set.
Can I undo a macro in Excel?
Usually not with Excel’s Undo command. A macro can clear the undo history, and its changes are not generally reversible with Ctrl+Z on Windows or Command+Z on Mac. Save a backup before running unfamiliar or consequential VBA.
What should I use instead of a macro recorder?
Use formulas for live calculations, Power Query for repeatable data preparation, or a suitable automation tool for workflows spanning applications. Choose VBA when workbook-specific automation is needed and the code can be maintained safely.
Related
- Excel Shortcut to Select a Row
- Excel Shortcut to Select Visible Cells in a Filtered Range
- Excel Save As Shortcut: Windows, Mac, and Web
Try it: the Column Letter to Number: aA is 27, XFD is 16,384. Converts both ways.
More in VBA & macros
- VBA MsgBox Sound: What Triggers It and How to Control ItIn Excel VBA, MsgBox has no argument for choosing or setting a sound. On Windows, a message box…
- Excel VBA Hex: Convert Numbers and ColorsIn Excel VBA, use the Hex function to turn a number into its hexadecimal text representation: for example,…
- Excel VBA: Delete a PivotTable SafelyTo delete a PivotTable with VBA, clear its full report range: use pt.TableRange2.Clear after setting pt to the…
- VBA Dictionary Key Count: How to Use the Count PropertyTo count the keys in a VBA dictionary, read its Count property: dict.Count. It returns the number of…
- How to Copy and Paste VBA Code into ExcelTo copy and paste VBA code into Excel, open the Visual Basic Editor, insert a standard module, paste…
- Excel VBA Data Validation List: Setup and ExamplesIn Excel for Microsoft 365 on Windows, create a VBA dropdown by applying data validation with Type:=xlValidateList and…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.