Home |
Search |
Today's Posts |
#30
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Check out the final 5 lines of the procedure...
I replaced this (old): ReDim ConsolidatedArray(1 To x - 1, 1 To UBound(Array2, 2)) For x = 1 To UBound(ConsolidatedArray, 1) For Y = 1 To UBound(ConsolidatedArray, 2) ConsolidatedArray(x, Y) = Array3(x, Y) Next Y Next x with this (new): Dim ThereAreDuplicates As Boolean ThereAreDuplicates = False If Not x = UBound(Array3, 1) Then ThereAreDuplicates = True ElseIf x = UBound(Array3, 1) Then If Array3(UBound(Array3, 1), UBound(Array3, 2)) = "REPETIDO" Then ThereAreDuplicates = True End If End If If ThereAreDuplicates = True Then ReDim ConsolidatedArray(1 To x - 1, 1 To UBound(Array2, 2)) ElseIf ThereAreDuplicates = False Then ReDim ConsolidatedArray(1 To x, 1 To UBound(Array2, 2)) End If For x = 1 To UBound(ConsolidatedArray, 1) For Y = 1 To UBound(ConsolidatedArray, 2) ConsolidatedArray(x, Y) = Array3(x, Y) Next Y Next x |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Trying to append to file using an array | Excel Programming | |||
Append data from a column to separate table array | Excel Programming | |||
Consolidate data in an 2-dimension array in VBA | Excel Programming | |||
how to know which row to append for the last row | Excel Programming | |||
Qn: How to Append??? | Excel Programming |