PC Review


Reply
Thread Tools Rate Thread

Array Formulas + VB Code

 
 
cubhasker@gmail.com
Guest
Posts: n/a
 
      20th Mar 2007
I want to write VB code for implementing Array formulas.am new to VB
coding

Here is the array formula I have successfully written in excel

{=SUM(IF('Sheet1'!$B$7:$B$4978="Red",IF('Sheet1'!$K$7:$K
$4978="Accept",'Sheet1'!$G$7:$G$4978,0),0))}

Can someone help me out with the VB equivalent code.

Thanks!!

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      20th Mar 2007
Activesheet.Evaluate("SUM(IF('Sheet1'!$B$7:$B$4978=""Red"",IF('Sheet1'!$K$7:$K$4978=""Accept"",'Sheet1'!$G$7:$G$4978,0),0))")

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I want to write VB code for implementing Array formulas.am new to VB
> coding
>
> Here is the array formula I have successfully written in excel
>
> {=SUM(IF('Sheet1'!$B$7:$B$4978="Red",IF('Sheet1'!$K$7:$K
> $4978="Accept",'Sheet1'!$G$7:$G$4978,0),0))}
>
> Can someone help me out with the VB equivalent code.
>
> Thanks!!
>



 
Reply With Quote
 
cubhasker@gmail.com
Guest
Posts: n/a
 
      20th Mar 2007
On Mar 20, 3:03 pm, "Bob Phillips" <bob....@somewhere.com> wrote:
> Activesheet.Evaluate("SUM(IF('Sheet1'!$B$7:$B$4978=""Red"",IF('Sheet1'!$K$7:$K$4978=""Accept"",'Sheet1'!$G$7:$G$4978,0),0))")
>
> --
> ---
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
>
> <cubhas...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
> >I want to write VB code for implementing Array formulas.am new to VB
> > coding

>
> > Here is the array formula I have successfully written in excel

>
> > {=SUM(IF('Sheet1'!$B$7:$B$4978="Red",IF('Sheet1'!$K$7:$K
> > $4978="Accept",'Sheet1'!$G$7:$G$4978,0),0))}

>
> > Can someone help me out with the VB equivalent code.

>
> > Thanks!!


Thanks Bob!! it worked

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Convert Array Formulas to Regular Formulas minyeh Microsoft Excel Worksheet Functions 0 21st Mar 2010 05:55 AM
Convert Array Formulas to Regular Formulas Domenick Microsoft Excel Worksheet Functions 4 19th Mar 2010 01:23 PM
Writing Array formulas in code Simon - M&M Microsoft Excel Programming 4 23rd Jun 2009 01:40 PM
VBA Code Optimization for Array Formulas web1@umarwadia.com Microsoft Excel Programming 0 11th Oct 2007 06:46 PM
Array formulas Bankboy Microsoft Excel Worksheet Functions 2 14th May 2004 06:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:35 PM.