Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default .Formula = help needed

How do I get this formula translated in VBA ".Formula =" format?
=SUM(INDIRECT("AB"&ROW()-COUNTA(Classes)&":AB"&ROW()-1))

--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default .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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 195
Default .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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula needed Sprinter Excel Discussion (Misc queries) 8 December 11th 08 05:02 PM
Excel formula to copy/paste formula needed please. colwyn Excel Discussion (Misc queries) 4 October 22nd 08 11:27 PM
needed formula Mikey[_2_] Excel Worksheet Functions 4 December 19th 07 12:56 AM
Formula help needed cheetah Excel Worksheet Functions 0 November 30th 06 04:06 PM
Formula Help Needed BDY Excel Discussion (Misc queries) 3 October 26th 05 05:35 PM


All times are GMT +1. The time now is 09:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"