473,388 Members | 1,346 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

Count Occurrences of a Value in a Column

3
Can I please have some simple coding that will allow me to do this?
The example of what I need to count is as follows:
The data is retreived from a Microsoft Excel Spreadsheet.
In VB6 it prints the following on screen:

Expand|Select|Wrap|Line Numbers
  1. choice1       choice2       choice3
  2. 1             4            2
  3. 2             3            1
  4. 4             2            1
  5. 3             1            4 
  6. 4             1            3
  7. 3             2            1
  8. 2             4            1
  9. 3             4            2
  10. 4             1            3 
  11. 3             2            1
I want the program to count the number of times each number occurs in each row, and then print this on screen.
Aug 5 '07 #1
0 1113

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: laredotornado | last post by:
Hello, I am trying to decipher an XSL sheet that is not my own, and yes, I'm a newbie. <xsl:template match="sentence"> <xsl:variable name="lines" select="count(line) + count(preceding::line)"/>...
3
by: jose luis fernandez diaz | last post by:
Hi, In the program below: #include <iostream.h> #include <set> int main() { const char *ptr_vars = {"one"};
21
by: rccf6178 | last post by:
Hi all, Do anyone know how to write a C program to count the frequency of a certain key pattern in a given datafile? Input: • Three alpha-numeric keys separated by space • A data file...
4
by: sibingpeter | last post by:
Hi there, Im trying to find the right way to code the loop to count the number of occurences of a given substring in a string. Im able to find the first occurence using the strstr function, but...
6
by: dBNovice | last post by:
Hey group, I am trying to do a count of the number of papers in a table. The table has a PaperID that differentiates each paper , e.g. 004.1. Some papers are reused. The reused paper is given...
2
by: DrewKull | last post by:
Ok ... so I'm looking at a query where im trying to show a bunch of columns counted up based on criteria ... So far i've been able to count all the rows up and show them ... and also count up...
9
by: nick048 | last post by:
Hi to All, I need to search the string occurencies in a structure like this: struct node { char info; struct node *next; };
26
by: Ping | last post by:
Hi, I'm wondering if it is useful to extend the count() method of a list to accept a callable object? What it does should be quite intuitive: count the number of items that the callable returns...
1
by: carolyns | last post by:
I am working with Access 2000, on Windows XP (all updates). I designed a survey in Word with 150+ questions. Roughly 60 questions use a lookup list of 7 different responses. I have the survey...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.