首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Excel VBA获取唯一值

Excel VBA获取唯一值
EN

Stack Overflow用户
提问于 2018-07-04 05:57:27
回答 3查看 98关注 0票数 2

我有两个数组: DirCurrentArray和DirHistoryArray,但似乎无法从DirHistoryArray获取DirCurrentArray中唯一的值

代码语言:javascript
复制
Dim DirCurrentArray As String
Dim DirHistoryArray As Variant

'Gets Filenames into Array
Do While xFile <> ""
    DirCurrentArray(fileCount) = xFile
    xFile = Dir$
    fileCount = fileCount + 1
Loop

For Each i In DirCurrentArray
        For Each j In DirHistoryArray
            If i = j Then
                finalCount = finalCount + 1
                DirFinalArray(finalCount) = i
            End If
        Next j
    Next i

我想要的结果是删除了在DirHistoryArray中找到的所有值的DirCurrentyArray

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51163310

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档