筛选后求和的公式是
成都创新互联成立以来不断整合自身及行业资源、不断突破观念以使企业策略得到完善和成熟,建立了一套“以技术为基点,以客户需求中心、市场为导向”的快速反应体系。对公司的主营项目,如中高端企业网站企划 / 设计、行业 / 企业门户设计推广、行业门户平台运营、成都App定制开发、手机网站制作、微信网站制作、软件开发、成都多线机房等实行标准化操作,让客户可以直观的预知到从成都创新互联可以获得的服务效果。
=subtotal(9,b2:b99)
对ab列进行筛选,筛选a列的“a”,并求和的代码如下:
sub
xxx()
activesheet.range("$a$1:$b$999").autofilter
field:=1,
criteria1:="a"
dim
xrng
as
range
set
xrng
=
range("b2:b999")
msgbox
worksheetfunction.subtotal(9,
xrng)
end
sub
当点击button1的时候就显示吧~~才5分,真是可怜的分数。
button1里面的事件
Dim conn As SqlConnection = New SqlConnection(数据库连接)
Dim dr As SqlDataReader = Nothing
Dim cmd As SqlCommand
conn.Open()
cmd = New SqlCommand("select * from gussmann where name='" TextBox1.Text "'", conn)
dr = cmd.ExecuteReader()
GridView1.DataSource = dr
GridView1.DataBind()
conn.Close()
Sub Find(ByRef Obj As DataGridView, Optional ByVal value As String = Nothing, Optional ByVal cellIndex As Integer = 1)
For Each i As DataGridViewRow In DataGridView1.Rows
If value Is Nothing OrElse value = "" Then
i.Visible = True
Else
Try
If i.Cells(cellIndex).Value IsNot Nothing Then i.Visible = i.Cells(cellIndex).Value = value
Catch ex As Exception
End Try
End If
Next
End Sub
Find(DataGridView1, "张三",1)