数据透视表值单元格地址

时间:2016-05-27 08:47:54

标签: excel vba excel-vba pivot-table

是否可以通过VB获取数据透视表中值的单元格地址(或单元格范围)?

示例:

05-27 14:07:22.624 V/chromium_net(12606): external/chromium/net/socket/ssl_client_socket_openssl.cc:514: [0527/140722:INFO:ssl_client_socket_openssl.cc(514)] ~SSLClientSocketOpenSSL()
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): MyApp.MyApp signature not valid.  Found: 
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): MIIDDTCCAfWgAwIBAgIEB8tB2jANBgkqhkiG9w0BAQsFADA3MQswCQYDVQQGEwJVUzEQMA4GA1UE
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): ChMHQW5kcm9pZDEWMBQGA1UEAxMNQW5kcm9pZCBEZWJ1ZzAeFw0xNjA1MTIxMDMxNTNaFw00NjA1
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): MDUxMDMxNTNaMDcxCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdBbmRyb2lkMRYwFAYDVQQDEw1BbmRy
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): b2lkIERlYnVnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvthA9cxvZnBHqyULJ+XP
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): X0ZF2A3NIe3+gkkM1lbcUqaLvOAVNmQ06Odi2aP25S1eX51jU2lQ90R36/xi0mjjPfZD2JzLOeD+
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): TYzrqguutxLU2BBAduroaAYvYX8Fw3h5J5ySWK2GtvyTcLjMAyslR+8LDZ92FxR0RGNykdDLhMBH
05-27 14:07:22.954 V/GoogleSignatureVerifier(12606): MVb3lyfEuzBLz8TWDR2lhvUzq6DfxcAiEwKw23jxDv7KIjUeGROY2y+G2xnoABGood9m3WX7tant


05-27 14:07:30.344 E/Volley  (12606): [24733] hj.a: Unexpected response code 400 for https://clients4.google.com/glm/mmap/api

我怎样才能得到REG1的单元格地址 - > FALSE - > 11?

我知道当我点击它时,它会给我“B3”,但我想通过VB找到它。

2 个答案:

答案 0 :(得分:1)

答案 1 :(得分:1)

试试这个:

Sub test()
    Dim Data As Range, cl As Range
    Set Data = Range(Cells.Find("REG1").Offset(, 1), _
                     Cells.Find("REG2").Offset(-1, 2))

    For Each cl In Data
        If UCase(cl.Value2) = "FALSE" And cl.Offset(, 1).Value2 = 11 Then Exit For
    Next cl

    If Not cl Is Nothing Then MsgBox cl.Address
End Sub

试验: enter image description here