getting this error "compile error: Expected: end of statement”

steve400243

Active Member
Joined
Sep 15, 2016
Messages
429
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hello, Anyone know why I would be getting this error with this code? Any help would be greatly appreciated.

VBA Code:
FR = MyRegions.Areas(1).Cells(1).Row
    .Range("M" & FR & ":P" & lr).SpecialCells(xlBlanks).Formula = "=IF(Q3="FMM",NETWORKDAYS.INTL(LOOKUP(2,1/($G$3:$G3>0),$G$3:$G3),I3,"1000011"),NETWORKDAYS(LOOKUP(2,1/($G$3:$G3>0),$G$3:$G3),I3,Sheet2!$B$2:$B$7))-1"
    End With
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
You need to double-up all the quotes inside the formula
 
Upvote 0
You need to double-up all the quotes inside the formula

Thanks Fluff - I guess I'm not seeing where quotes are missing? I tried here, but still get the same message.

VBA Code:
"=IF"(Q3="FMM",
 
Upvote 0
Glad you sorted it & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,775
Messages
6,121,498
Members
449,034
Latest member
Raygers

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