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

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
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,223,885
Messages
6,175,178
Members
452,615
Latest member
bogeys2birdies

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