I need to find the countifs of two seperate variables and put that result in the adjacent cells. Basically, trying to find a way to pin point where the last two variables reside in the two seperate countif ranges. Data will be added in anytime
ex. rows (7-11) and columns Y and AA
[TABLE="width: 100"]
<TBODY>[TR]
[TD]Y
[/TD]
[TD]AA
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD]=countif(Y:Y,"ABC")
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD]=countif(Y:Y,"DEF")
[/TD]
[/TR]
</TBODY>[/TABLE]
Then if the ABC countif is greater than "V38", I want to populate the cell next to them with a P. For countif DEF I want to do the same except use cell "V39".
ex. Let's say V38= 3 V39= 2
[TABLE="width: 100"]
<TBODY>[TR]
[TD]Y
[/TD]
[TD]AA
[/TD]
[TD]AB
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD]=countif(Y:Y,"ABC")
[/TD]
[TD]=if(AA10>V38,"P"," ")
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD]=countif(Y:Y,"DEF")
[/TD]
[TD]=if(AA11>V39,"P"," ")
[/TD]
[/TR]
</TBODY>[/TABLE]
So if there was another ABC after the last DEF than I would need the macro to recognize that and put the P in the adjacent cell to that instead if greater than "V38"
Is there a way to do this?
What i started to mess around with:
Dim countif as an integer
countif= (Y:Y,"ABC")
when countif > "V38" then
activecell.value = "P"
ex. rows (7-11) and columns Y and AA
[TABLE="width: 100"]
<TBODY>[TR]
[TD]Y
[/TD]
[TD]AA
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD]=countif(Y:Y,"ABC")
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD]=countif(Y:Y,"DEF")
[/TD]
[/TR]
</TBODY>[/TABLE]
Then if the ABC countif is greater than "V38", I want to populate the cell next to them with a P. For countif DEF I want to do the same except use cell "V39".
ex. Let's say V38= 3 V39= 2
[TABLE="width: 100"]
<TBODY>[TR]
[TD]Y
[/TD]
[TD]AA
[/TD]
[TD]AB
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]ABC
[/TD]
[TD]=countif(Y:Y,"ABC")
[/TD]
[TD]=if(AA10>V38,"P"," ")
[/TD]
[/TR]
[TR]
[TD]DEF
[/TD]
[TD]=countif(Y:Y,"DEF")
[/TD]
[TD]=if(AA11>V39,"P"," ")
[/TD]
[/TR]
</TBODY>[/TABLE]
So if there was another ABC after the last DEF than I would need the macro to recognize that and put the P in the adjacent cell to that instead if greater than "V38"
Is there a way to do this?
What i started to mess around with:
Dim countif as an integer
countif= (Y:Y,"ABC")
when countif > "V38" then
activecell.value = "P"
Last edited: