0% found this document useful (0 votes)
64 views1 page

Vba Code For Array PDF

This document contains VBA code to open two workbooks, extract data from them into arrays, copy the arrays to a sheet in the active workbook called "Nokia Data", close the opened workbooks, and delete a row from the sheet if it contains "Notification ID".
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
64 views1 page

Vba Code For Array PDF

This document contains VBA code to open two workbooks, extract data from them into arrays, copy the arrays to a sheet in the active workbook called "Nokia Data", close the opened workbooks, and delete a row from the sheet if it contains "Notification ID".
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Dim nunetact1, nunetact2 As Workbook

Dim array1, array2 As Variant

Dim i, j, k, P As Integer

'Power Alarms

Set nunetact1 = Workbooks.Open(ThisWorkbook.Path & "\Network Update Netact-1")

array1 = nunetact1.Sheets(1).Range("A1").CurrentRegion.Value

Set nunetact2 = Workbooks.Open(ThisWorkbook.Path & "\Network Update Netact-2")

array2 = nunetact2.Sheets(1).Range("A1").CurrentRegion.Value

nunetact1.Close

nunetact2.Close

Sheets("Nokia Data").Activate

ThisWorkbook.Sheets("Nokia Data").Range(Cells(1, 1), Cells(UBound(array1, 1), UBound(array1,


2))).Value = array1

i = Sheets("Nokia Data").Range("A" & Rows.Count).End(xlUp).Row

Dest.Sheets("Nokia Data").Range(Cells(i + 1, 1), Cells(i + UBound(array2, 1), UBound(array2, 2))) =


array2

i = Sheets("Nokia Data").Range("A" & Rows.Count).End(xlUp).Row

For j = 2 To i

If Dest.Sheets("Nokia Data").Range("A" & j).Value = "Notification ID" Then k = j

Next j

Dest.Sheets("Nokia Data").Rows(k).Delete

You might also like