Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have this formula in a macro.
If sh2Row = 30 Then sh2.Cells(32, 3).Value = _ Application.WorksheetFunction.CountIf(Range("C1:C3 0"), 0) End If It gives me error. Please Help Thanks & Regards. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sat, 1 Nov 2003 02:56:39 -0500, Michael168
wrote: It usually helps when you state what the error IS. The code works fine for me. Things to check: - How is the variable sh2Row being populated? Are you sure that it contains a valid value? - Are you sure that you have a sheet's CODE NAME, not its NAME, set as sh2? (As in the line "sh2.Cells(32, 3).Value"). Look in the Project Explorer of the Visual Basic Editor. (You can turn it on through the View menu if you can't see it.) Turn on the Properties window. Select the relevant worksheet in the Project Explorer, and make sure that the Property shown as (Name) (that is, the one with the brackets around it) is sh2. If it's not, that's your problem. I have this formula in a macro. If sh2Row = 30 Then sh2.Cells(32, 3).Value = _ Application.WorksheetFunction.CountIf(Range("C1:C 30"), 0) End If It gives me error. Please Help --------------------------------------------------------- Hank Scorpio scorpionet who hates spam is at iprimus.com.au (You know what to do.) * Please keep all replies in this Newsgroup. Thanks! * |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
it appears that you are missing a dot between sh2 and row
should be sh2.Row, otherwise it's interpreted as a variable "sh2row" which you don't have RADO "Michael168" wrote in message ... I have this formula in a macro. If sh2Row = 30 Then sh2.Cells(32, 3).Value = _ Application.WorksheetFunction.CountIf(Range("C1:C3 0"), 0) End If It gives me error. Please Help Thanks & Regards. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
where is the mistake? | Excel Discussion (Misc queries) | |||
mistake in formula | Excel Discussion (Misc queries) | |||
I saved it by mistake!!!! | Excel Worksheet Functions | |||
Found Mistake can't correct. | Excel Worksheet Functions | |||
If I get the help box up by hitting F1 by mistake, how can I get . | Excel Discussion (Misc queries) |