VBA - Count.if

smund

Board Regular
Joined
Mar 15, 2005
Messages
52
Please,
Sorry, but for me is too difficult.
I need to do a macro to paste this formula in some rows in a column.
but it needs to look for a specific column (Like the column of the latest date)
in the first cell, the column of the second cell is fix(like XFD in Excel 2010), and the line
it needs to look for a "Name of a client" in the Column A.
The macro counts how many "P" are in a range on Plan2 and put the result on a specific
cell on Plan1.
Thanks

ActiveCell.FormulaR1C1 = "=COUNTIF(Plan2!R[-3]C[-5]:Plan2!R[-3]C[20],P)"
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
No, I don't understand what columns you are wanting to examine from your description. Is it XFD, or A, or the mysterious "specific column" that you mention?
 
Upvote 0

Forum statistics

Threads
1,224,597
Messages
6,179,808
Members
452,944
Latest member
2558216095

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