+ Reply to Thread
Results 1 to 2 of 2

VBA Countif

  1. #1
    Registered User
    Join Date
    05-17-2018
    Location
    Houston,Texas
    MS-Off Ver
    2010
    Posts
    1

    VBA Countif

    Hi, Newbie here. thanks for making this possible. I have a data tester that test a pipe every ten minutes or so. The pressure starts off at -1 and goes up to 605 or so and holds for 5 seconds and then drops back down to 1 or -1. The program reader makes a .DAT file which i then export as a .CSV file.
    The date and time are text. I used a countifs in excel and used the sort command to show me change of days. There is a 2018 when the day changes. The countifs worked beautiful except i have one problem. I used 600 as my count "600"
    When the the pressure goes up like this- 600,601,603,604,605 then 603,602,600 or something like that. I count two 600's for one pipe not good. This changes my over all count.
    I need to find a way to only count one data number at 600 or above for each test so i can get accurate number of test in the 24hr period.
    I know that the dates being in text form does not help.
    Thanks for your help.
    Mrbob2

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: VBA Countif

    It would help immensely to provide an example of your data, with an example of what kind of result you want, and any VBA code you have. The paper clip icon does not work for attachments. Instead, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

    Your description does not mention VBA, in spite of your title. How does VBA come into play here?

    The description about COUNTIF and 600 is a bit of a red herring--it would be better to just state what you need to do rather than describe a method that you know doesn't work. It sounds like you are trying to count how many tests are performed in a given day.

    Where do you want to show that count relative to your data?

    Can a test start before midnight and then finish after midnight the next day? If so, is that test counted for the day it starts or the day it ends?

    I would recommend a step where the date and time is converted from text to Excel date/time. That will make any other analysis of this data much easier.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding a COUNTIF function to an existing IF AND COUNTIF Formula...
    By Ourkid123uk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-24-2018, 10:09 AM
  2. Replies: 8
    Last Post: 05-27-2017, 07:04 AM
  3. Faster if/countif formula for flagging uniques - countif too slow
    By Speshul in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-19-2015, 01:44 PM
  4. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  5. Adding a CountIF to a formula that is already Countif
    By Cmorgan in forum Excel General
    Replies: 4
    Last Post: 06-01-2011, 09:34 AM
  6. COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 PM
  7. Countif w/ Multiple Criteria-How do I use countif
    By Patrick_KC in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-09-2005, 05:05 PM

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