Getting Count from Sheet1 based on criteria Possibly use of COUNTIF

I have a workbook with two sheets.
Sheet1 has the data and Sheet2 is a summary sheet I am able to use CountIF to pull the car count based on model using =COUNTIF(Inventory!B:B,"NIssan" (col C sheet2). My challenge is populating col D, ColE, ColF and ColG. Hope someone can help me
with the correct fomula for these.

I'd create a helper column, for example in column Z on the Inventory sheet.
In Inventory!Z2: =(E2=G2)
Fill down to the end of the data.
On the Summary sheet:
In C2: =COUNTIF(Inventory!B:B,B2)
In D2: =COUNTIFS(Inventory!B:B,B2,Inventory!Z:Z,TRUE)
In E2: =COUNTIFS(Inventory!B:B,B2,Inventory!Z:Z,FALSE)
In F2: =COUNTIFS(Inventory!B:B,B2,Inventory!H:H,"CA")
In G2: =COUNTIFS(Inventory!B:B,B2,Inventory!H:H,"WA")
Select C2:G2 and fill down as far as needed.
Regards, Hans Vogelaar (http://www.eileenslounge.com)

Similar Messages

  • How to get "Count" from CAF's Application Service

    hi
    i want know how many data in my entity, i can use "findAll" and read the List's size.
    but it will waste resource.
    have any other way to get the count from entity?

    seem no way.

  • Get USRID from P0105 based from KNVP-PERNR...

    Hello Experts,
    I need to get the USRID from P0105 based from the value that I got in
    KNVP-PERNR(Personnel Number). Please give me an example on how to do this.
    Also, is the field USRID contains the e-mail addresses of users? Thank you guys
    and take care!

    Hi Anji,
    I tried creating a test program using what you said but it still won't work. Below is the test code:
    REPORT  z_aris_test_16.
    TABLES: p0105.
    START-OF-SELECTION.
      SELECT userid FROM p0105 INTO p0105-userid.

  • Getting counts from detail tables

    I have multiple record bock that displaye a list of cell ids and their attributes; each record also displays record counts of its 3 detail tables.
    Originally, the POST-QUERY trigger select the counts (3 detail tables) as part of the data block for each record (or cell id). There are over 16K records, so each record query issues 3 selects. The whole query toke over a minute. I was asked to improve the retrieval time.
    At first I thought perhaps I could put the 3 counts in 3 separate data blocks and issue one query each in a "select cell_id, count(*). . . group by cell_id" but scrolling would not synchronize with the other blocks. So I dropped that idea.
    Next, I added a program unit from which the WHEN-NEW-FORM-INSTANCE trigger calls after execute_query. It issues "select cell_id, count(*). . . group by cell_id" (one for each detail table) and fills the count columns in the original data block. However I need to set the block property Query All Records to YES so that the cell ids and attributes are filled first. That means that before the form comes up it has to retrieve all records. That saves me about 10-15 seconds od retrieval time and I lose the ability to quickly bring up the form.
    Then I looked at using dfferent Query Data Source Types. I don't think I could do one query with counts of detail tables. Besides, some items (attrinutes) of the cell are upate-able.
    Any ideas and suggestions will be appreciated.

    Yes. I suggested adding columns to the master tables and introduce stored triggers.
    Since the change is not trivial, according to management, they put in on hold.I'm not sure if you misunderstood my suggestion or were responding to a different post. The query I wrote was for counting the detail records on the fly rather than populating new columns. If you include the counting in your main query then you will probably not have a much slower query than if you don't show any counts at all. Scrolling through the block will be no slower than if you had no counts, because no extra processing needs to be done. (You'll still have to fetch the detail blocks for each row, so moving to the last record will still be slow - that's a bad indicator of the performance of a query.)
    For example, fetching the objects for each user takes 5 seconds. When I include the number of tables, indexes and constraints for each user within the query the time only goes up to just under 9.
    SQL> set autot trace stat
    SQL> set timing on
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type
      5  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:05.13
    Statistics
           4656  recursive calls
              0  db block gets
          85106  consistent gets
              0  physical reads
              0  redo size
        1469372  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> SELECT
      2    owner,
      3    object_name,
      4    object_type,
      5    (SELECT Count(*) FROM all_tables WHERE owner = ao.owner) count_tables,
      6    (SELECT Count(*) FROM all_indexes WHERE owner = ao.owner) count_indexes,
      7    (SELECT Count(*) FROM all_constraints WHERE owner = ao.owner) count_constraints
      8  FROM all_objects ao;
    39062 rows selected.
    Elapsed: 00:00:08.86
    Statistics
           4656  recursive calls
              0  db block gets
         270299  consistent gets
              0  physical reads
              0  redo size
        1684042  bytes sent via SQL*Net to client
          29021  bytes received via SQL*Net from client
           2606  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
          39062  rows processed
    SQL> If you populate the counts in post-query then the process is similar to the block below. I tried to get a timing and stats for this but it took over 15 minutes so I shut it down.
    DECLARE
    ct NUMBER;
    ci NUMBER;
    cc NUMBER;
    BEGIN
      FOR ao IN (SELECT owner, object_name, object_type FROM all_objects)
      LOOP
        SELECT Count(*) INTO ct FROM all_tables WHERE owner = ao.owner;
        SELECT Count(*) INTO ci FROM all_indexes WHERE owner = ao.owner;
        SELECT Count(*) INTO cc FROM all_constraints WHERE owner = ao.owner;
      END LOOP;
    END;Creating a view on the query and writing the "instead of" triggers is hopefully a trivial enough operation that management won't get in the way. Then you'll be able to update the block.

  • Problem to get count from resultset with select count(1) like query

    Hi,
    The snippet of code is like this ...!
    preparedStatement = connection.prepareStatement("select count(1) as count from acf_users where acf_user_name like ? and acf_user_password like ?");
    preparedStatement.setString(1,stringUsername);
                   preparedStatement.setString(2,stringPassword);
                   resultSet = preparedStatement.executeQuery() ;
                   System.out.println("The ResultSet Count checkUser() : "+resultSet.getString("count"));
                   preparedStatement.close();
    But there is a SQLException like :
    java.sql.SQLException: ResultSet.next was not called
    I want to extract and check the count in the program..
    Does anyone has the solution, comments on this.
    Thanks in Advance,
    -Sachin

    Thanks a lot to have a look on it :
    I got the solution on it as :
    preparedStatement = connection.prepareStatement("select count(*) as total from acf_users where acf_user_name like ? and acf_user_password like ?");
                   preparedStatement.setString(1,stringUsername);
                   preparedStatement.setString(2,stringPassword);
                   resultSet = preparedStatement.executeQuery() ;
    resultSet.next();
                   System.out.println("The ResultSet checkUser() : "+resultSet.getInt("total"));
    The important line is :
    resultSet.next()
    Thanks once again,
    Sachin !

  • How to get count from new enhanced for loop

    Is there a better way to determine the count when new enhanced for loop is used as follows:
    String[] test = new String[]{"1","2","3"};
    int count = 0;
    for(String i: test)
    count++;
    system.out.println("count: "+count);
    }

    There are cases where I need to use the count inside
    the for loop. I can keep track of the count by using
    the increment. But, then I would rather using the old
    for loop. Go ahead and use it. Are you under the assumption that the old form should be avoided?
    There is no saving in term of efficiency and readability.If there is any added efficiency in the "for each" form of the loop, it is on the micro level, and you would never notice it.
    As far as readability, look at some of the crazy solutions you've been given to avoid the general for loop, then reconsider which is more readable.

  • Get data from Sharepoint site in different farm using webservice, and current site using claims mode authentication.

    Hi , 
    I have a site that runs on   Claims Mode (  NTLM) . That site has a web part that needs to show the data from any  sharepoint farm, SharePoitn  2010 , or 2007 or 2003.
    I am getting 401 unauthorized when I   try to get data from webservice running in sharePoint context.
    But when I run the same code in  Windows Console application  then it is giving no error.
    What I doubt is that this issue is due to the reason that I have  set
    claims mode authentication.
    Because same code is running  in different farm in a site that is configured  using windows authentication.

    So generally speaking, you're talking about a VERY long running topic of authentication methods... and generally speaking, in the world of Windows, the only long running authentication options have been:
    - NTLM (limited to one hop)
    - Kerberos (unlimited hops)
    - Application level authentication (ex: SQL auth, also, no hops)
    Recently, Microsoft has been investing in Claims Based Auth... and I fully expect claims to start working their way into other systems (previously starting to work into Windows via the CardSpace technology, but also in other ways such as Win8's ability to
    log in with a LiveID)... but building a new authentication method into ALL applications is a VERY long process, and the complexity of claims adds a LOT of consideration (claims from the same AD can look VERY different depending on the STS, so lots of questions
    around things like bridging claims).
    So as far your SP auth needs...
    IF both applications are CLAIMS AWARE, then you MAY be able to use claims (which support unlimited hops)... but that's just not very likely yet (and will probably take another 5-10 years to be available across the entire enterprise)... otherwise, KERBEROS
    Outside of the Microsoft world... KERBEROS is open spec, so is supported by other systems (such as authenticating to linux)... claims based auth is also open spec, but again, still new... there are a few other options (LDAP, etc), but none that are native
    to Windows (so you rely on things like third party auth modules for Windows, which Novell has done for DECADES with NDS and eDir)
    And again, SharePoint can convert claims to Kerberos using the C2WTS... which MS uses internally for things Excel Services connecting to a backend SQL server... but it DOES require the Kerb and C2WTS configuration.
    if you're having issues using Kerb auth... then it sounds like Kerb isn't configured correctly... and Kerb is a PAIN to configure (whitepaper for SP Kerb is ~100 pages long)... IIS (and SharePoint) also has the added benefit of failing over to NTLM if Kerb
    fails (and you shouldn't disable this behavior, since it'll break other settings elsewhere)
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • How to get username from Form-based login

    I am using form-based login in my web.xml file.
    When I attempt to access a protected .jsp page, I get sent to my login page as expected.
    When I enter my username/password successfully it forwards me to the .jsp page I was trying to go to, as expected.
    From that .jsp page, how do I get the username/password info from the login form? I looked at the session attributes, request attributes, and request parameters, but I don't see anything. Does the form-based authentication remove these variables?
    I need the username that is filled out in the login form, so that I can do custom work with it. I cannot ask the user for it again after they login, as that is inefficient and sloppy.

    Found it.
    request.getUserPrincipal().getName()

  • Getting count from ldapseaarch results

    Hi,
    I am using Netscape Directory Server 4.16.
    I am using ldapsearch command to search for specific attributes. When I execute ldapsearch I am getting the results properly.
    I would like to know how to get the result count instead of results. At the end of the search results i get a message # no. of matches.
    I want this number directly. Is it possible with ldapsearch? Did any one implement this type of functionality? If any one did this before, please give me the code or give me the directions how to do this.
    Thanks in advance,
    Murthy

    Hi,
    I did not understand the
    dn|grep \^ dn
    what is this dn? I tried with this, but I did not get any result.
    I used the follwoing command.
    bash-2.03# ./ldapsearch -b "ou=GEWorker,o=ge.com" -v -u -h myserver.com -p 3891 -d "cn=Directory Manager" -w xxxxx uid=Murthy dn|grep \^dn
    The result I got was
    compile with -DLDAP_DEBUG for debugging
    Where could eb the wrong?
    Murthy

  • Get var from InputText based on a "read only view"

    Hi.
    I have build some read only views from DB.
    All my views are linked.And the Data of each View is shown with " selectOneChoice" or "inputText".
    So far so good.
    But now my 1.problem.
    How can I get the value of the inputText ( coordinates" lat , long ") in a var to use it with a google maps function like
    map.addOverlay(createMarker(new GLatLng(lat,long)))
    2. problem
    how can i change the readout value of the inputText from[i] 51,2456 to 51.2456 for example
    Hope for your help!
    Chris

    Hi,
    Yes, I'am talking about ViewObjects in ADF Business Components.
    Version view:
    ADF Business Components     10.1.3.41.57
    BPEL Designer     10.1.3.3.0 (Build 070615.0525)
    CVS Version     Internal to Oracle JDeveloper (client-only)
    Java(TM) Platform     1.5.0_06
    Oracle IDE     10.1.3.41.57
    Struts Modeler Version     10.1.3.41.57
    UML Modelers Version     10.1.3.41.57
    Versioning Support     10.1.3.41.57
    For UserInterface I'am using "Web Tier--->JSF--->JSF JSP
    I've got 5 read only views: Region, Country, City, Location and Koord ( including all coordinates of Location)
    Now I want to show a marker in googleMaps with these coordinates but it doesn't work.
    function load() {
    if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng(51,6),1);
    var Lat;
    var Longi;
    here starts my problem
    map.addOverlay(createMarker(new GLatLng(Lat,Longi))) } }
    </script>
    <afh:body onload="load()" onunload="GUnload()">
    <af:messages/>
    <af:form id="frm">
    </input>
    <af:selectOneChoice id="navList1" autoSubmit="true"
    value="#{bindings.LolaRegionV1.inputValue}"
    label="#{bindings.LolaRegionV1.label}">
    <f:selectItems value="#{bindings.LolaRegionV1.items}"/>
    </af:selectOneChoice>
    <af:inputText value="#{bindings.LolaKoordV1Lat1.inputValue}"
    label="#{bindings.LolaKoordV1Lat1.label}"
    required="#{bindings.LolaKoordV1Lat1.mandatory}"
    columns="#{bindings.LolaKoordV1Lat1.displayWidth}"
    partialTriggers="navList4" id="input1">
    <af:validator binding="#{bindings.LolaKoordV1Lat1.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.LolaKoordV1Lat1.format}"/>
    </af:inputText>
    <af:inputText value="#{bindings.LolaKoordV1Longi.inputValue}"
    label="#{bindings.LolaKoordV1Longi.label}"
    required="#{bindings.LolaKoordV1Longi.mandatory}"
    columns="#{bindings.LolaKoordV1Longi.displayWidth}"
    partialTriggers="navList4" id="input2">
    <af:validator binding="#{bindings.LolaKoordV1Longi.validator}"/>
    <f:convertNumber groupingUsed="false"
    pattern="#{bindings.LolaKoordV1Longi.format}"/>
    </af:inputText>
    </af:form>
    I cant'*t give out the value of Lat , Longi to show the Marker.But a simple example like
    var x;
    var y;
    x = "51";
    y = "6";
    map.addOverlay(createMarker(new GLatLng(x,y)))
    is running.
    Thank you for help!
    Christian
    Message was edited by:
    user585675
    Message was edited by:
    user585675

  • Pulling text from fields based on criteria

    So, I am somewhat new to Adobe LifeCycle designer. I am creating an order form that lists product with some prdouct information. Currently a customer can fill in a quantity under the quantity field and it will auto generate a subtotal and will add that value to the grandtotal.
    The next thing that I have to do is create a final page that is the order form. This order form will be printed and mailed in. What I would like to do is automatically pull the products where the quantity is not equal to zero into those fields. I would like to pull the name, size, quantity and subtotal into a row in a table on the order form. So for each product that has a quantity it would have to start on a new line in the table.
    ex. First row column one name is ItemNumber1, Second Row column one is ItemNumber2
    I think i need a variable that will globally add a number every time one of the quantites is not blank and it uses a row in the table.
    Anyone have any coding suggestions?

    Check this example from Niall, it shows how you can loop through a table and copy data to another one.
    http://www.assuredynamics.com/index.php/portfolio/duplicating-table-data/

  • How can I get alerts from SharePoint based on a date that exists in a list?

    I have a list that contains renewal records.  One of the fields in each record is "Renewal Date".  I would like to have SharePoint send an alert when it is 1 month prior to that date. 
    Can anyone help me do so?
    Chas Roberts

    This answer details a few different ways to do this - workflow, scheduled jobs, open source and commercial add-ons.
    StackOverflow - Dated
    reminders in sharepoint calendars
    http://stackoverflow.com/questions/529045/dated-reminders-in-sharepoint-calendars
    Regards
    Ryan
    Pentalogic Technology - Web Parts for Microsoft SharePoint
    www.pentalogic.net

  • How to get data from a pointer to an array using dlportio?

    I use DLPORTIO.DLL to access the parallel port on a WinXP. The purpose is to read data coming from an fpga.
    The transfer rate is quite high (more than 500kB/s).
    DLPORTIO.DLL can buffer data from the parallel port.
    I would like to use this fonctionality to speed up the data transfer by ready 16 x 8 bits that have been buffered. I get the pointer to the element from the dll. 8bits means U8 in Labview and, of course, 16 => U16 and 32bits => U32. But what to connect when I want 128bits??? How to use the pointer cominf from the dll and say to Labview it is the pointer to the first element of my 16 element array??
    Thanks to all
    Dai Tran Duy
    Dai
    LV 7.1 - WIN XP - RT - FP
    Attachments:
    dlportio.zip ‏852 KB

    LabVIEW does not have a 128 bit numeric so you will need to create a work around of sorts. What I would suggest is creating some wrapper dll functions. These funcitons would take say an array of U8s from LabVIEW, convert them into your 128 bit number and then call your dll with that.
    In addition take a look at the manual on exteranl code in LabVIEW, Using External Code in LabVIEW, which discusses how to pass arrays to a dll. In addition there is a shipping example in LabVIEW 7.0 that shows how to pass all sorts of LabVIEW and C data types. The example even includes C code snipits.

  • Getting information from SOAP call in R/3 using RFC adapter

    I have following scenario:
    R/3 (RFC)> XI (SOAP)> WebService
    I want to know within the R/3 if the call to the webservice fails (Server not available, etc), that there is a problem.
    Is there any exception code or way to fill the exception with a return code? I have tried to map a exception, but it will only be created, if the WS-Application creates the exception not if an error occurs in XI or the AF.
    Best regards
    Helmut

    You can capture exception from R/3 and send it to external WebService. You need to add a Module  to your SOAP Communication Channel:
    Module Key: SOAP
    Parameter Name: XI.SendMode , value = http
    Module Key: SOAP
    Parameter Name: XI.TargetURL , value = http://XXX(your url to the XI engine)
    Module Key: SOAP
    Parameter Name: XI.User , value = <username>
    Module Key: SOAP
    Parameter Name: XI.Password , value = <password>
    Once you do this you can get R/3 Exceptions passed to your w/s.
    Thanks
    Ashish

  • Want to trigger event count from both counters (E) to buffer using FOUT (100kHz/16 or slower) as a trigger

    We are using a AT-MIO-16E-1 board. We would like to run an xy raster pattern from the buffer (AO) in order to reduce scan times (256 x 256 pt images). At each AO (voltage) point we would like to read from both onboard counters and store the number of events counted to memory, reading out the buffer say every 256 pts (1 scan line). In order to ensure accurate counting periods the counters need to be triggered to coincide with some "dwell time" at each AO voltage pt. We have thought of using FOUT for the trigger or perhaps out analog out scanning signal but are concerned that the FOUT freq is too high (6250 khz - we would like 100hz-10khz). Any suggestions or e
    xamples would be appreciated.

    Hello;
    The main problem there is going to be the counter triggering. I'm saying that because, there isn't a way for the Analog Input operation to send pulses that will trigger of the timer operation at multiple voltage levels. The only solution for this I can think of is, instead of having an analog voltage level which would indicate the position of xy, if you could have a device which would give a TTL pulse instead when the desired position is reached, then you could use the 6601 to have a triggered operation at the counter. Another constraint for your application right now is the fact that the E-series boards' counters don't have triggering features, only gated features.
    Anyway, you would need to have a TTL pulse either to trigger (in case of the 6601 count
    ers) or to gate (in case of the E-series board), when the desired XY position is reached.
    Meanwhile, you can refer to the Labview examples for Streaming to disk, Analog I/O and counter operations. You can go to Search Examples->I/O Interfaces->Data Acquisition->Data Logger ( for streaming to disk operations); Search Examples->I/O Interfaces->Data Acquisition->Analog Output ( for Analog Output Operations); and Search Examples->I/O Interfaces->Data Acquisition->Counters (for counter operations). Also; I'm including an Application Note which talks about synchronization of multiple DAQ tasks I think will be helpful for you also.
    Regards.
    Filipe
    Attachments:
    Advanced_Sync_Techniques_for_DAQ.pdf ‏189 KB

Maybe you are looking for