View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Transporting Variable from macro to spreadsheet

Ken,

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


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Ken Newman" wrote in message
...
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
--
Ken