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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,653
Messages
6,120,751
Members
448,989
Latest member
mariah3

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