members i need your help!

pnuckle

New Member
Joined
Feb 12, 2011
Messages
15
Whenever i try to run this code it gives me error 1004 (application defined or object defined error)

Sub Overall2Summary()
dim j as integer
j = 250

Sheets(2).Cells(5, "Q") = "=IF(COUNT(D2:D" & j & ")=0," & """" & "," & "COUNTIF(D2:D" & j & "," & """>=81""" & "))"
End Sub

i haven't seen yet what is wrong!
Any help please!
no excel problem is unsolvable.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Code:
Sub Overall2Summary()
Dim j As Integer
j = 250

Sheets(2).Cells(5, "Q").Formula = "=IF(COUNT(D2:D" & j & ")=0,"""",COUNTIF(D2:D" & j & ","">=81""))"
End Sub
 
Upvote 0
Code:
[COLOR=#0000ff]Sheets(2).Cells(5, "Q") = "=IF(COUNT(D2:D" & j & ")=0," & "[COLOR=red][B]""[/B][/COLOR]""" & "," & "COUNTIF(D2:D" & j & "," & """>=81""" & "))"[/COLOR]
 
Upvote 0

Forum statistics

Threads
1,224,551
Messages
6,179,470
Members
452,915
Latest member
hannnahheileen

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