Help again with applying macro to everyone cell/row

Status
Not open for further replies.

spiffmonkey1

New Member
Joined
Jun 23, 2011
Messages
41
Hi, so i have a macro-

Sub ChangecolorAnalysis()
'1 box colored G=G
If WorksheetFunction.CountIf(Range("D69:D80"), "yes") = 1 _
And WorksheetFunction.CountIf(Range("D69:D80"), "N/A") = 8 _
And WorksheetFunction.CountBlank(Range("D69:D80")) = 3 Then
Range("D67", "E67") = "yes"
Else:
Range("D67", "E67") = "N/A"
End If
End Sub

So D67="yes" when there are 1 "yes", 8 "N/A", and 3 blanks. The problem is I want this to apply to MANY columns such as column E,F,G,H,I,J,K. The problem with this macro is that it only apples to one column specifically

Thanks so much!
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Status
Not open for further replies.

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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