Code to calculate dates from multiple worksheets and consolidate to master sheet

Jim Doornek

Board Regular
Joined
May 23, 2008
Messages
52
Fluff
Per your request, I am submitting this request in a new thread.

For each of the individual worksheets being analyzed in the array, I'd like to get the total column count.

I added a line of code (lcolumn) to the "One week only" macro, that I thought would do this. However, the code is returning the column count in "Master" worksheet and not the columns in the individual array(i) for the worksheet being analyzed.

Here is where I added the line.

For i = 0 To UBound(myArr) Set myRng = Nothing

With Sheets(myArr(i))

lcolumn = Cells(1, Columns.Count).End(xlToLeft).Column


Here is a link to the entire workbook:
https://www.dropbox.com/s/5h8f56pcem...uler.xlsm?dl=0
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You've forgotten the . in front of Cells, it should be
Code:
lcolumn = .Cells(1, Columns.Count).End(xlToLeft).Column
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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