Have you tried this:
Dim sVal as String
sVal = "50"
ActiveCell.FormulaR1C1 = "=MAX(RC[-3]:R[" & sVal & " ]C[-3])"
More Related Contents:
- VBA: Selecting range by variables
- How do I get values from a hidden worksheet using VBA [closed]
- How to copy cells that contain certain text to another worksheet [closed]
- VBA Macro for copying and pasting columns on same excel sheet
- Excel VBA, code to count the # of filled cells, then find highest and 2nd highest and subtract the corresponding column #’s [closed]
- How to add default signature in Outlook
- Levenshtein Distance in VBA [closed]
- VBA Runtime Error 1004 “Application-defined or Object-defined error” when Selecting Range
- How do I base64 encode a string efficiently using Excel VBA?
- Assign event handlers to controls on user form created dynamically in VBA
- How to move each emails from inbox to a sub-folder [duplicate]
- Conditional Formatting using Excel VBA code
- Outlook Reply or ReplyAll to an Email
- How to use Events with Option Button Controls on Userform [duplicate]
- VBA Search in Outlook
- How do I use variables to set properties in VBA (Excel)
- VBA: Else without If Error
- Object variable or With block variable not set (Error 91)
- How do I open an outlook .msg file from my harddrive that is NOT in outlook?
- Convert RTF (Rich Text Format) code into plain text in Excel
- lastrow and excel table.
- How can I create text files with special characters in their filenames
- Open a workbook from VBA and disable Workbook_Open() code?
- How to filter listbox values based on a Textbox value
- Text To Clipboard in VBA Windows 10 Issue
- Excel VBA using FileSystemObject to list file last date modified
- How to get the procedure or function name at runtime?
- Copy an array reference in VBA
- What does the To and Step mean in VBA?
- Query my excel worksheet with VBA