Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ed ed is offline
external usenet poster
 
Posts: 59
Default Writing Array Formulas in VBA

Anyone know how to assign an array formula to a cell
using VBA? If possible, I'd like to use 'A1' format.
Follow on question: Complicating matters, the formula has
quotes in it - how do I force the quotes through without
VBA bugging out due to the extra quotes I'm putting
around the formula
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Writing Array Formulas in VBA

Ed,

ActiveCell.FormulaArray = "=1+1"

Not sure what you mean in your second question.
Could you supply an example?

Rob


"Ed" wrote in message
...
Anyone know how to assign an array formula to a cell
using VBA? If possible, I'd like to use 'A1' format.
Follow on question: Complicating matters, the formula has
quotes in it - how do I force the quotes through without
VBA bugging out due to the extra quotes I'm putting
around the formula



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Writing Array Formulas in VBA

Ed,

I sometimes find the easiest way to get the correct quote configuration is
to enter the formula into a cell with the macro recorder turned on, and then
copy the resulting code.

hth,

Doug

"Ed" wrote in message
...
Anyone know how to assign an array formula to a cell
using VBA? If possible, I'd like to use 'A1' format.
Follow on question: Complicating matters, the formula has
quotes in it - how do I force the quotes through without
VBA bugging out due to the extra quotes I'm putting
around the formula



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Writing Array Formulas in VBA

If I understand your second question, I believe you need to use double
quotes around text...

Range("B1").Formula = "=If(A10,""Yes"",""No"")"

--
Dana DeLouis
Using Windows XP & Office XP
= = = = = = = = = = = = = = = = =


"Ed" wrote in message
...
Anyone know how to assign an array formula to a cell
using VBA? If possible, I'd like to use 'A1' format.
Follow on question: Complicating matters, the formula has
quotes in it - how do I force the quotes through without
VBA bugging out due to the extra quotes I'm putting
around the formula



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Writing Array Formulas in VBA

And try it using the A1 reference style.

the help is incorrect with this statement:

If you use this property to enter an array formula, the formula must use the
R1C1 reference style, not the A1 reference style (see the second example).


Ed wrote:

Anyone know how to assign an array formula to a cell
using VBA? If possible, I'd like to use 'A1' format.
Follow on question: Complicating matters, the formula has
quotes in it - how do I force the quotes through without
VBA bugging out due to the extra quotes I'm putting
around the formula


--

Dave Peterson

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
writing formulas David Cheeks New Users to Excel 2 August 29th 08 12:00 AM
writing if formulas mafarmer Excel Worksheet Functions 1 December 5th 06 03:07 PM
Writing Formulas Irv Excel Worksheet Functions 2 December 28th 04 09:25 PM
Problem writing formulas - please, please help! Oliver Kharraz Excel Programming 1 December 1st 03 12:03 PM
VBA: Writing an array function (like MMult) fxmolden Excel Programming 4 November 13th 03 07:45 PM


All times are GMT +1. The time now is 08:36 PM.

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

About Us

"It's about Microsoft Excel"