VA help to enter array formula

asad

Well-known Member
Joined
Sep 9, 2008
Messages
1,434
Hello All,

I am trying to enter following array formula using VBA. But it does not change the lookup cell. Can someone please help me out?

Code:
Range("C6:C29").Formula = "=ROUND($J$1*SUM(IF($P$6:$P$293=[B]A6[/B],[COLOR=#FF0000][/COLOR]IF(MONTH($Q$6:$Q$293)=MONTH($E$1),$R$6:$R$293))),0)"

"A6" in the above formula need to change to A7, A8 and so on.

Any help is appreciated.

Asad
 
Thanks to all of you guys for helping me out.
Now I have two working solutions :)

Regards
Asad
 
Last edited:
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
You're welcome. I did try the fill down method but couldn't it work either :confused:

If you have large datasets the fill down method would be the way to go.

Regards,

Robert
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,187
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top