Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default programatically entering a CSE formula

hi folks

What is the correct way to enter a CSE formula into a range of cells?

With Sheet1
.Range("A10:C70").Formula = "=SUM(lARGE((" .... etc... "
End With

This works for non-CSE formulas, but how do I enter CSE ones?

much thanks
Dorre



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default programatically entering a CSE formula

With Sheet1
.Range("A10:C70").FormulaArray = "=SUM(LARGE((" .... etc...
"
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"dorre" wrote in message
...
hi folks

What is the correct way to enter a CSE formula into a range of cells?

With Sheet1
.Range("A10:C70").Formula = "=SUM(lARGE((" .... etc... "
End With

This works for non-CSE formulas, but how do I enter CSE ones?

much thanks
Dorre





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default programatically entering a CSE formula

Bob & Tom

Thanks for your quick responses. My original question didn't make one
thing very clear. The Array Formula needs to be dragged down because the
formula changes in each cell. When I use the .FormulaArray property, I get
the same formula in each cell.

With Sheet1
.Range("C10:C70").FormulaArray = "=SUM(LARGE((A$10:A$70=A10)*...etc ..."
End With

can this be done?
TQ, Dorre


"Bob Phillips" wrote in message
...
With Sheet1
.Range("A10:C70").FormulaArray = "=SUM(LARGE((" .... etc...
"
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"dorre" wrote in message
...
hi folks

What is the correct way to enter a CSE formula into a range of cells?

With Sheet1
.Range("A10:C70").Formula = "=SUM(lARGE((" .... etc... "
End With

This works for non-CSE formulas, but how do I enter CSE ones?

much thanks
Dorre







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default programatically entering a CSE formula

Try something like the following:

With Sheet1
.Range("C10").FormulaArray = "your formula here"
.Range("C10:C70").FillDown
End With


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"dorre" wrote in message
...
Bob & Tom

Thanks for your quick responses. My original question didn't
make one thing very clear. The Array Formula needs to be
dragged down because the formula changes in each cell. When I
use the .FormulaArray property, I get the same formula in each
cell.

With Sheet1
.Range("C10:C70").FormulaArray =
"=SUM(LARGE((A$10:A$70=A10)*...etc ..."
End With

can this be done?
TQ, Dorre


"Bob Phillips" wrote in
message ...
With Sheet1
.Range("A10:C70").FormulaArray = "=SUM(LARGE((" ....
etc...
"
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"dorre" wrote in message
...
hi folks

What is the correct way to enter a CSE formula into a range
of cells?

With Sheet1
.Range("A10:C70").Formula = "=SUM(lARGE((" ....
etc... "
End With

This works for non-CSE formulas, but how do I enter CSE ones?

much thanks
Dorre









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default programatically entering a CSE formula

works like a charm!
Dorre




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default programatically entering a CSE formula

Chip - if I might be allowed a followup question. The code you suggested
works wonderfully.

With Sheet1

.Range("C10").FormulaArray = "=SUM(LARGE((A$10:A$70=A10)*...etc ..."

.Range("C10:C70").FillDown
End With

But... I need to use it in columns C, F, I... . I can use .Offset(0,3)
before the .FormulaArray and the .FillDown, but is it easy to also offset
the formula in quotes?

(to "=SUM(LARGE((D$10:D$70=D10)*...etc ..." ), then G$10:G$70...
etc.

Thanks, Dorre



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default programatically entering a CSE formula

Try

With Sheet1
.Range("C10").FormulaArray = "your formula"
.Range("C10:C70").FillDown
.Range("C10:G70").FillRight
End With



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"dorre" wrote in message
...
Chip - if I might be allowed a followup question. The code you
suggested works wonderfully.

With Sheet1

.Range("C10").FormulaArray =
"=SUM(LARGE((A$10:A$70=A10)*...etc ..."

.Range("C10:C70").FillDown
End With

But... I need to use it in columns C, F, I... . I can use
.Offset(0,3) before the .FormulaArray and the .FillDown, but is
it easy to also offset the formula in quotes?

(to "=SUM(LARGE((D$10:D$70=D10)*...etc ..." ), then
G$10:G$70... etc.

Thanks, Dorre





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default programatically entering a CSE formula

the better name is Array Formula. Many people will have no idea what you
mean when you say CSE formula

--
Regards,
Tom Ogilvy


"dorre" wrote:

hi folks

What is the correct way to enter a CSE formula into a range of cells?

With Sheet1
.Range("A10:C70").Formula = "=SUM(lARGE((" .... etc... "
End With

This works for non-CSE formulas, but how do I enter CSE ones?

much thanks
Dorre




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
Entering Formula - Cannot select cell as it is hidden by formula Jim Excel Worksheet Functions 0 March 25th 10 07:22 AM
Problems entering Data validation Programatically J Streger Excel Programming 3 April 1st 05 05:30 PM
Inserting formula programatically Tony Excel Programming 3 February 3rd 05 10:13 AM
Programatically Entering an Array Formula John C.[_4_] Excel Programming 1 July 28th 04 01:53 AM
modify cell references in a formula programatically ralphehowardjr Excel Programming 2 December 20th 03 01:18 PM


All times are GMT +1. The time now is 02:53 PM.

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"