View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default Code copies ONLY last j from sheet

On Thursday, December 12, 2013 1:47:03 AM UTC-8, Howard wrote:
On Thursday, December 12, 2013 1:33:51 AM UTC-8, Claus Busch wrote:

Hi Howard,








Am Thu, 12 Dec 2013 09:37:52 +0100 schrieb Claus Busch:








I can't reproduce this.








what about your range?




You are looking for j in column B




Set rngB = .Range("B6:B" & lr)




but you are checking for lr in column K




lr = .Cells(.Rows.Count, 11).End(xlUp).Row












Regards




Claus B.




--




Win XP PRof SP2 / Vista Ultimate SP2




Office 2003 SP2 /2007 Ultimate SP2




That for sure is a woops, but as luck would have it column K and column B are the same number of rows.



I had checked with a rngB.Select in my trouble shooting and the correct range of column B was selected.



I'll give stuff another look over like you suggest.



Howard




I looked it over and the only thing I saw was the
varOut = c.Offset(, 2).Resize(, 76)
Resize did not have a row number. I was under the impression at least a 1 was required with resize for the row, unlike offset where the coma is sufficient. I put the 1 in and no change.

I did the =B9='Sales Forecast'!B16 test and it returns true for each sheet against one of the values per sheet in rngB.

And I tried a different copy paste line but the results are still the same.

The green tabs are the only ones of concern and there is only data to go to
HC-01, HC-03, HC-04 & HC-05.

I left the copied data as the code produces in each of those sheets. If you run the code twice it copies over the existing posted data, does not offset.

Here is my copy of the workbook, take a look at you convenience, if you don't mind.

https://www.dropbox.com/s/dafrbm0her...rop%20Box.xlsm

thanks, Howard.