WorksheetFunction.CountA(Worksheets("Data_Rough").Range(Range("C4"), Range("C4").End(xlDown))) ................it gives application defined/object defined error. Can anybody explain?
WorksheetFunction.CountA(Worksheets("Data_Rough").Range(Range("C4"), Range("C4").End(xlDown))) ................it gives application defined/object defined error. Can anybody explain?
Try fully qualifying all the range references
![]()
Please Login or Register to view this content.
Actually what should I do if I write a code in the sheet rather than this workbook or modules and want to select a dynamic range from another worksheet?
when you say 'write code in sheet' do you mean the Sheet object or acutally in a cell as a formula?
Sheet Object
Apart from the result not actually being stored anywhere that code should work.
Perhaps you should post workbook example detailing what you have used and what exactly you are trying to do
Picture1.jpg
Here, I want to count the number of non blank cells within a range (which i want to select dynamically) in worksheet Data_Rough when the code is written in worksheet Data
that's a picture, I asked for a "workbook example"
and you have not explained how that code should be used? where should the result of the COUNTA go?
I just want the answer in a MSGBOX
I'm still non the wiser about how this should actually work but above will display information in msgbox![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks