hsandeep
Well-known Member
- Joined
- Dec 6, 2008
- Messages
- 1,226
- Office Version
- 2010
- Platform
- Windows
- Mobile
In my Workbook there are numerous Worksheets out of which approximately 30 ws are using ‘Worksheet code’. In ‘ThisWorkbook’ also I am using a macro.
In Module, I am using a ‘vba code’ for Worksheet (tab named “ZZZ”) using 'User Defined Function' to get the output in some cells wherever UDF is there.
1 line in between the code being used is
I want to add another line in this macro which would check & perform some actions if…..
If y>(count of) number of cells from D10:M10 Then
Macro
End If
I could have used the code line
But I want macro to do this counting in Worksheet (tab named “ZZZ”)
How to accomplish?
Thanks in advance
In Module, I am using a ‘vba code’ for Worksheet (tab named “ZZZ”) using 'User Defined Function' to get the output in some cells wherever UDF is there.
1 line in between the code being used is
Rich (BB code):
y = Application.WorksheetFunction.CountIf(Range("D10:M10"), "=1")
I want to add another line in this macro which would check & perform some actions if…..
If y>(count of) number of cells from D10:M10 Then
Macro
End If
I could have used the code line
Rich (BB code):
If y>10 Then
Macro
End If
But I want macro to do this counting in Worksheet (tab named “ZZZ”)
How to accomplish?
Thanks in advance