Array Formulas + VB Code

C

cubhasker

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!!
 
B

Bob Phillips

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)
 
C

cubhasker

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)

Thanks Bob!! it worked
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top