vba Lengthy formula split help

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
976
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,


please assist for breaking the lengthy formula line by using line Continuation
When I tried getting error message, compile error expected list seperator or)


its working formula
Range("m2").FormulaR1C1 = _
"=SUMPRODUCT(ISNUMBER(MATCH(R2C8:R239C8," & cr1 & ",0))*ISNUMBER(MATCH(R2C9:R239C9," & cr2 & ",0))*ISNUMBER(MATCH(R2C11:R239C11," & cr3 & ",0))*ISERROR(MATCH(R2C10:R239C10," & cr4 & ",0)))"


expected result somewhat like this after breaking the formula
Range("m2").FormulaR1C1 = _
"=SUMPRODUCT(ISNUMBER(MATCH(R2C8:R239C8," & cr1 & ",0)) _
*ISNUMBER(MATCH(R2C9:R239C9," & cr2 & ",0)) _
*ISNUMBER(MATCH(R2C11:R239C11," & cr3 & ",0)) _
*ISERROR(MATCH(R2C10:R239C10," & cr4 & ",0)))"

Thanks
mg
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Maybe:

Range("m2").FormulaR1C1 = "=SUMPRODUCT(ISNUMBER(MATCH(R2C8:R239C8," & cr1 & _
",0))*ISNUMBER(MATCH(R2C9:R239C9," & cr2 & ",0))*ISNUMBER(MATCH(R2C11:R239C11," _
& cr3 & ",0))*ISERROR(MATCH(R2C10:R239C10," & cr4 & ",0)))"
 
Upvote 0

Forum statistics

Threads
1,215,335
Messages
6,124,326
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