ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Array Formulas + VB Code (https://www.excelbanter.com/excel-programming/385716-array-formulas-vbulletin-code.html)

[email protected]

Array Formulas + VB Code
 
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!!


Bob Phillips

Array Formulas + VB Code
 
Activesheet.Evaluate("SUM(IF('Sheet1'!$B$7:$B$4978 =""Red"",IF('Sheet1'!$K$7:$K$4978=""Accept"",'Shee t1'!$G$7:$G$4978,0),0))")

--
---
HTH

Bob

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



wrote in message
ups.com...
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!!




[email protected]

Array Formulas + VB Code
 
On Mar 20, 3:03 pm, "Bob Phillips" wrote:
Activesheet.Evaluate("SUM(IF('Sheet1'!$B$7:$B$4978 =""Red"",IF('Sheet1'!$K$7:$K$4978=""Accept"",'Shee t1'!$G$7:$G$4978,0),0))")

--
---
HTH

Bob

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

wrote in message

ups.com...

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



All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com