Non sequential read and write with arrays

dbfuller2002

New Member
Joined
Dec 17, 2018
Messages
2
I am attempting to pull data into 3 arrays. 2 arrays from sheet one, "Summary", and 1 arrays from sheet two, "Detail". After pulling the arrays, I will compare Array1, "Project Name" on sheet Summary to Array3, "Project Name" from the detail Sheet. If the values match, I need to take he corresponding Array2 from sheet Summary and build a new array4, that will write in one command to Sheet Detail. On the Detailed sheet, The Array Values are offset by 15 Rows. All Arrays are in Columns.

Summary
Array1 = A5:A24
Array2 = B5:B24
Array3 = A1, A16, A31 ...
Array4= W1, W16, W31...

My First Challenge is populate Array3. Below is the Code I am using.

For Three = 1 to 31
Array3 (Three) = ThisWorkBook.Worksheets("Detail").Range (A1 & Three + 15)
Next Three

The "For Next" Statement does not offset by 15 rows. It only offsets by 1 row.

I believe my next challenge will be writing Array4 To row W offset by 15 rows. Any help would be much appreciated.

Thanks,

Dave
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Hi & welcome to MrExcel
Try
Code:
For Three = 1 To 31 Step 15
     Array3(Three) = ThisWorkbook.Worksheets("Detail").Range("A" & Three)
Next Three
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,617
Latest member
Narendra Babu D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top