![]() |
.Formula = help needed
How do I get this formula translated in VBA ".Formula =" format?
=SUM(INDIRECT("AB"&ROW()-COUNTA(Classes)&":AB"&ROW()-1)) -- David |
.Formula = help needed
All you need to do is put the whole thing in quotes and then (to deal with
quotes inside quotes) double up the inner quotation marks. For cell A1, e.g.: Range("A1").Formula = "=SUM(INDIRECT(""AB""&ROW()-COUNTA(Classes)&"":AB""&ROW()-1))" -- - K Dales "David" wrote: How do I get this formula translated in VBA ".Formula =" format? =SUM(INDIRECT("AB"&ROW()-COUNTA(Classes)&":AB"&ROW()-1)) -- David |
.Formula = help needed
?B?SyBEYWxlcw==?= wrote
All you need to do is put the whole thing in quotes and then (to deal with quotes inside quotes) double up the inner quotation marks. For cell A1, e.g.: Range("A1").Formula = "=SUM(INDIRECT(""AB""&ROW()-COUNTA(Classes)&"":AB""&ROW()-1))" Perfect!! I can never seem to get the quotation marks placed right. Many thanks, -- David |
All times are GMT +1. The time now is 10:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com