I'm currently using a countif formula which has the condition as eg ">50"
This returns a count of anything in a list greater than 50.
What I need though is to have this 50 as a variable. I have tried a cell reference but Excel is then looking for the cell ref in the list ie ">F27"
I though about using a macro button with code that concatenated the first half of the formula then took the variable and pieced it together and then put this in the cell as a string which would then work, but this does'nt seem to be working. Below is the code......
'
' Macro1 Macro
' Macro recorded 18/10/2002 by Finance
'
Dim Limit As Integer
Limit = Range("g29"
Range("F35".Select
ActiveCell.FormulaR1C1 = "=COUNTIF(Range(F12:F24)," & ">" & string(Limit)&""
End Sub
Can anyone help...?
Thanks
Jamie
This returns a count of anything in a list greater than 50.
What I need though is to have this 50 as a variable. I have tried a cell reference but Excel is then looking for the cell ref in the list ie ">F27"
I though about using a macro button with code that concatenated the first half of the formula then took the variable and pieced it together and then put this in the cell as a string which would then work, but this does'nt seem to be working. Below is the code......
'
' Macro1 Macro
' Macro recorded 18/10/2002 by Finance
'
Dim Limit As Integer
Limit = Range("g29"
Range("F35".Select
ActiveCell.FormulaR1C1 = "=COUNTIF(Range(F12:F24)," & ">" & string(Limit)&""
End Sub
Can anyone help...?
Thanks
Jamie