Copy from same column into different column into a tracking sheet

candyL

New Member
Joined
Mar 14, 2014
Messages
2
Hello all,

I am trying to build a macro where it allows me to copy data in Range(I3:I40) within master sheet where the data changes every day into a tracking file Range (the next available black column) so, into newsheet C4:C41 on day 1, D4:D41 on day 2 etc. i can never get the right column right seems to be missing a critical formula.

Appreciate all the expert help!
 
Q1) does Column A and B on the "NewSheet" contain data?
Q2) will all Range I3:I40 contain data (including Zeros)?



Shee if the below works for you

Code:
Dim lastColumn As Long
lastColumn = Sheets("NewSheet").Cells(4, Columns.Count).End(xlToLeft).Column


Sheets("NewSheet").Range(Cells(4, lastColumn + 1), Cells(41, lastColumn + 1)).Value = _
Sheets("Master Data").Range("I3:I40").Value
 
Upvote 0
Q1) does Column A and B on the "NewSheet" contain data?
Q2) will all Range I3:I40 contain data (including Zeros)?



Shee if the below works for you

Code:
Dim lastColumn As Long
lastColumn = Sheets("NewSheet").Cells(4, Columns.Count).End(xlToLeft).Column


Sheets("NewSheet").Range(Cells(4, lastColumn + 1), Cells(41, lastColumn + 1)).Value = _
Sheets("Master Data").Range("I3:I40").Value

Yes Column A and B, (A4:B40) are the static data in master sheets, it's a list of names,

and I3:I40 will always have a value,

will give your code a try!, it was the count i couldn't get my head around
 
Upvote 0

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