
Hi,
Why export what you do not need, from Oracle,in the 1st place?
Have you tried Using a union function on them then Iterate over the new range?
Code:
CombinedRange2Delete = Union(UnwantedRange1,UnrantedRange2, ... ,UnwantedRange223)
For each(Current in CombinedRange2Delete)
Current.Delete
Next.
Another approach: Since there is more Unwanted collumns then it is maybe better to 1st isolate the Wanted then Delete any, from total columns, that do not intersect with the wanted columns. Get the total columns then the columns you want then delete any Total columns not intersecting with the wanted columns.
Code:
WantedColumns = Union(WantedRange1, WantedRange2, ..., WantedRange10)
TotalColumns = Range(Column1Name:Column223Name)
For each(CurrentColumn in TotalColumns)
IntersectColumns = Intersect(CurrentColumn , WantedColumns)
if IntersectColumns is Nothing then
CurrentColumn.Delete
end if
Next.
If you wanna chat about it:
[email protected]