Excel statistics QQ Chat record bar number

Source: Internet
Author: User

The QQ record from QQ to export to TXT file, and then import the Excel table, you will find the message record format:

2012-06-23 10:58:34 Xiao Ming

How are you doing!

2012-06-23 10:58:34 Little Red

How are you doing!


The message record is displayed in column A of the Excel table,


Then, list the dates of all statistics listed in column B, and the names of the people to be counted in column C, for example, column C counts the number of messages that xiaoming sends each day, and column D counts the number of red days

Use formulas in column C

For example: C2 = COUNTIF (a:a, "2012-06-23* xiaoming") C3 = COUNTIF (A:a,text (B3, "Yyyy-mm-dd") & "* xiaoming")


The B3 content is the 2012-6-24 format of the time class variable, "*" function is "2012-06-23" and "xiaoming" but add any character, COUNTIF is the statistics meet if condition record sum.


D2 = COUNTIF (a:a, "2012-06-23* Little Red") C3 = COUNTIF (A:a,text (B3, "Yyyy-mm-dd") & "* Little Red")


Statistics, the number of words that each person sends messages per day

The idea of designing the statistical algorithm is to determine the starting line number of the message sent in column A each day in column A, and the total number of rows that the message takes up, including the blank cell row, to make it easier to determine what to look for later, and then, based on the range of daily messages in column A, In the scope of the progressive traversal, find a user's speaking time period, count the number of characters included in the paragraph below, plus all the number of speech segments found add, get the user that day the total number of characters to speak (of course, the voice of the picture is just as a character record).

Public Function Calculatewords (ByVal SS as String, ByVal start as Long, ByVal J as Long) as Long        Dim I, K, result as L Ong    k = 0    result = 0 for    i = start-to         -J If Cells (I, 1) like SS-then            -k = i + 1            while Len (Cells (k, 1 ) <> 0                result = result + Len (Cells (k, 1))                k = k + 1            wend         End If             Next    Quit:    Calculat Ewords = Resultend functionpublic Function totalrows (ByVal start as Long, ByVal T as Date) as Long   Dim I, J, K, Resul  T as Long    k = 0    result = 0    j = Sheet1.UsedRange.Rows.Count for       i = start to J         If Cells (i, 1) like "20?? -?? -?? ??:??:?? * then            Dim T1            as Date t1 = left (Cells (i, 1), ten)            If T1 > t then                GoTo Quit            end If         End if< C26/>next    Quit:    totalrows = Iend Function

function usage instructions, for example,

Determine the message record for the day of 2012-06-23, the number of rows in the table A column, and the E-List of index results

E2 = totalrows (1, B2) E3 = Totalrows (E2, B3)

We use F to save Xiaoming's message character number

F2 = Calculatewords (TEXT (B2, "Yyyy-mm-dd") & "* xiaoming", 1, e2-1) that is, 2012-06-23, the total number of messages sent by xiaoming

F3 = Calculatewords (TEXT (B3, "Yyyy-mm-dd") & "* xiaoming", E2, E3-1) that is, 2012-06-24, the total number of messages that Xiaoming sent


Finally, the results of the statistics can be plotted in the form of graphs.






Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Excel statistics QQ Chat record bar number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.