Excel使用COUNTIF和动态输入

时间:2017-01-26 02:54:55

标签: excel vba excel-formula

我正在尝试使用单元格值(在F8中)输入要在另一个工作簿(B中的Sep Miss$B中搜索的关键字。我想返回一个总计数,其中输入可以是整体或部分匹配。 BC=CountIf('Sep Miss'!$B:$B, F8) =CountIf('Sep Miss'!$B:$B, "*F8*") =CountIF('Sep Miss'!$B:$B, Summary!F8) =CountIF('Sep Miss'!$B:$B, "Summary!F8") =CountIF('Sep Miss'!$B:$B, "*Summary!F8*") - 我正在拖拽行。

我尝试了什么:

func urlSession(_ session: URLSession, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Swift.Void) {

    if (challenge.protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust) {
        if let trust = challenge.protectionSpace.serverTrust,
           let pem = Bundle.main.path(forResource: "https", ofType: "cer"),
           let data = NSData(contentsOfFile: pem),
           let cert = SecCertificateCreateWithData(nil, data) {
            let certs = [cert]
            SecTrustSetAnchorCertificates(trust, certs as CFArray)

            completionHandler(URLSession.AuthChallengeDisposition.useCredential, URLCredential(trust: trust))
            return
        }
    }

    // Pinning failed
    completionHandler(URLSession.AuthChallengeDisposition.cancelAuthenticationChallenge, nil)
}

1 个答案:

答案 0 :(得分:1)

你非常接近。类似的东西:

=CountIF('Sep Miss'!$B:$B, "*"&Summary!F8&"*")