VBA - array formula functions ok until I use an If THEN either side?

Loun

New Member
Joined
Dec 29, 2012
Messages
28
Hello,

I'm sure this is something simple but its been driving me crazy trying to figure it out.

i have the below array formula in VBA. I'm trying to check if the value calculated is above 1..... If I leave off the IF part at one end and the >1 then at the other it prints the value correctly on spreadsheet.

However, when I put the IF part on to try to get it to calculate internally and check the value rather than print the value it is not recognising anything greater than 1.....

any ideas? In sure I'm missing something that states to check the value of the formula or something but I can't figure it out.

If Selection.FormulaArray = "=SUM(IF(CONCATENATE(RC[2],RC[1])=CONCATENATE(RC[2]:R[96]C[2],RC[1]:R[96]C[1]),1,0))" > 1 Then

many thanks
 
Jonmo,

Perfect! Thanks a million for taking the time to assist with this!

Thanks,
lou
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Forum statistics

Threads
1,215,339
Messages
6,124,375
Members
449,155
Latest member
ravioli44

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