Macro needed

ironsides

Well-known Member
Joined
Aug 12, 2002
Messages
575
macro needed

in cell P2
I want to count the positive numbers in col AK (starting row 19)
If col D reads "cap"

thanks
ironsides
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Code:
Sub CapPositive()
With ActiveSheet
    .Range("P2").Value = WorksheetFunction.CountIfs(.Range("AK:AK"), ">0", .Range("D:D"), "cap")
End With
End Sub
 
Last edited:
Upvote 0
JoeMo Thanks for the macro, it works well...but i didn't explain myself completely
I think I need a condition format because in the D col, besides the "cap"
has 10 other classifications. sorry for my neglect.
 
Upvote 0
You'll need to provide some more detail - I have no idea what additional capability you are requesting.
 
Upvote 0
Starts Line 19
Col D has 11 names (eng...cap etc
Col K has numbers, Pos and Neg

I want to search col D, all lines that have "eng" and
count in Col K, positive numbers for that "eng"
and put the number in cell W2

Formula needed to do this

Thank you Ironsides
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,259
Members
452,626
Latest member
huntinghunter

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