if i give the function =countif(sheet1!E2:E12,quot;=Europequot;) in blank
shell of excel ,it gives no of rows having the word europe in the
column E . but if i give the same commend in macro it shows syntax
error .Sub parthamacro()
'
' parthamacro Macro
' Macro recorded 2/8/2006 by 128304
'
'
Dim nResult As Long
nResult = sheet1.countif(sheet1!E2:E12,quot;=Europequot;)
End Subcan you please help me , how to use countif function in macros--
parthaemail
------------------------------------------------------------------------
parthaemail's Profile: www.excelforum.com/member.php...oamp;userid=31311
View this thread: www.excelforum.com/showthread...hreadid=510077You can help yourself by looking at the vba help index or answer for
worksheet functions.
--
Don Guillett
SalesAid Software
quot;parthaemailquot; gt;
wrote in message
news
gt;
gt; if i give the function =countif(sheet1!E2:E12,quot;=Europequot;) in blank
gt; shell of excel ,it gives no of rows having the word europe in the
gt; column E . but if i give the same commend in macro it shows syntax
gt; error .
gt;
gt;
gt; Sub parthamacro()
gt; '
gt; ' parthamacro Macro
gt; ' Macro recorded 2/8/2006 by 128304
gt; '
gt;
gt; '
gt; Dim nResult As Long
gt; nResult = sheet1.countif(sheet1!E2:E12,quot;=Europequot;)
gt;
gt; End Sub
gt;
gt;
gt; can you please help me , how to use countif function in macros
gt;
gt;
gt; --
gt; parthaemail
gt; ------------------------------------------------------------------------
gt; parthaemail's Profile:
gt; www.excelforum.com/member.php...oamp;userid=31311
gt; View this thread: www.excelforum.com/showthread...hreadid=510077
gt;
Dim myRng as range
dim nResult as long
set myrng = worksheets(quot;sheet1quot;).range(quot;e2:E12quot;)
nresult = application.countif(myrng,quot;europequot;)
parthaemail wrote:
gt;
gt; if i give the function =countif(sheet1!E2:E12,quot;=Europequot;) in blank
gt; shell of excel ,it gives no of rows having the word europe in the
gt; column E . but if i give the same commend in macro it shows syntax
gt; error .
gt;
gt; Sub parthamacro()
gt; '
gt; ' parthamacro Macro
gt; ' Macro recorded 2/8/2006 by 128304
gt; '
gt;
gt; '
gt; Dim nResult As Long
gt; nResult = sheet1.countif(sheet1!E2:E12,quot;=Europequot;)
gt;
gt; End Sub
gt;
gt; can you please help me , how to use countif function in macros
gt;
gt; --
gt; parthaemail
gt; ------------------------------------------------------------------------
gt; parthaemail's Profile: www.excelforum.com/member.php...oamp;userid=31311
gt; View this thread: www.excelforum.com/showthread...hreadid=510077
--
Dave Peterson
- Dec 18 Thu 2008 20:47
countif usage in macro
close
全站熱搜
留言列表
發表留言
留言列表

