VBA 1004 Error - Embed formula into cell

JJCA99

Board Regular
Joined
Dec 4, 2014
Messages
50
Hello,

I have what seems like an easy fix but for whatever reason i'm getting the application/object defined error from the formula below.

fyi: I want to embed this formula into each cell so that anyone who uses the wb after me can see the formula used.

Code:
      With Range("Q6:Q" & Cells(Rows.Count, 2).End(xlUp).Row)
        .Formula = "=IF($Z6<=R$5,0,IF(AND($O6>$N6,R$5<$O6,$AA6<>0),SUMIFS(Maint_Summ!$AA:$AA,Maint_Summ!$D:$D,'SE CAPACITY'!$E6,Maint_Summ!$W:$W,'SE CAPACITY'!$C6),0)"
 
    End With
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Please Disregard this thread I found the error. I was missing a parenthesis on the end of the formula.
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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