Ken,
Try something like
ActiveCell.Formula = "= Max(R3C" & N & ":R3C256)"

Signature
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
>I have calculated a variable 'n' in a macro and want to put it into a
> spreadsheet.
> The expression ActiveCell.Formula = "= Max(R3Cn:R3C256)" doesn't work,
> although substituting a number for n does work
> Any solutions would be appreciated
Dave Peterson - 28 Feb 2007 22:14 GMT
Although Chip's line of code may work, I bet he meant:
ActiveCell.FormulaR1C1 = "= Max(R3C" & N & ":R3C256)"
> Ken,
>
[quoted text clipped - 16 lines]
> > --
> > Ken

Signature
Dave Peterson