Results 1 to 12 of 12

Code to count under certain condition

Threaded View

Marceltcm Code to count under certain... 08-29-2013, 02:15 PM
Jakobshavn Re: What´s wrong with my code 08-29-2013, 02:20 PM
Marceltcm Re: What´s wrong with my code 08-29-2013, 02:27 PM
HaHoBe Re: What´s wrong with my code 08-29-2013, 02:26 PM
Marceltcm Re: What´s wrong with my code 08-29-2013, 02:44 PM
Mumps1 Re: What´s wrong with my code 08-29-2013, 02:27 PM
Pepe Le Mokko Re: What´s wrong with my code 08-29-2013, 02:27 PM
Marceltcm Re: What´s wrong with my code 08-29-2013, 02:46 PM
HaHoBe Re: Code to count under... 08-29-2013, 02:58 PM
Marceltcm Re: Code to count under... 08-29-2013, 03:02 PM
  1. #1
    Registered User
    Join Date
    08-29-2013
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    34

    Code to count under certain condition

    Hi everyone,
    Could someone identify what´s wrong with my code below?
    I want it to count under a certain condition and then store the total number in a variable, but I´m getting a "0" answer. The code is like follows:

    Sub ContaSEespecial()
    Dim i As Integer
    Dim j As Integer
    Sheets("Geral").Activate
    For i = 201 To i = 210 Step 1
    If (Cells(i, 42).Value and Cells(i, 43).Value and Cells(i, 44).Value) > 10 Then
    j = j + 1
    End If
    Next i
    MsgBox (j)
    End Sub
    Tnx!
    Last edited by Marceltcm; 08-29-2013 at 03:13 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. what is wrong with this code- error from vba code
    By punna111 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2013, 03:14 PM
  2. Code for email alerts from excel isn't working, wrong code possibly?
    By jessthorogood in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-27-2012, 01:45 AM
  3. Wrong line of code banned me out and can't access vba code...
    By albertc in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 05-14-2012, 02:41 PM
  4. what is wrong with the code
    By blyzzard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-20-2011, 02:56 AM
  5. What's wrong with my code ?
    By christophe meresse in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1