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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,950
Messages
6,122,436
Members
449,083
Latest member
Ava19

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