vba Lengthy formula split help

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
983
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

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
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,223,886
Messages
6,175,195
Members
452,616
Latest member
intern444

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