Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My bad (got myself confused)
You can pick up formulas that way, but not formats. You will need to loop for the formats With Worksheets("Sheet1") set rng = .Range(.Cells(2, 8*i -6), _ .Cells(8,8*i)) End With Array(i, 4) = rng.Value ' use value just to establish the array Array(i,5) = rng.value ' now replace with Numberformats m = 1 : n = 1 for k = lbound(array(i,5),1) to ubound(array(i,5),1) for l = lbound(array(i,5),2) to ubound(array(i,5),2) array(i,5)(k,l) = rng(m,n).NumberFormat n = n + 1 Next m = m + 1 Next End With Worksheets("Deck").Range("N38:T44").Value = Array(2, 4) for i = 1 to 7 for j = 1 to 7 Worksheets("Deck").Range("N38:T44")(i,j).NumberFor mat = Array(2, 5)(i,j) Next Next -- Regards, Tom Ogilvy "Mike Stout" wrote in message ... Tom, Thanks for the help with qualifying the cells. When I try and run the recommended code I get an "Object doesn't support this property or method" error at the line: Array(i,5) = .Range(.Cells(2,8*i-6), .Cells(8,8*i)).Format Can you suggest why this would be? Regards, Mike *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding " , ) to text array | Setting up and Configuration of Excel | |||
Adding up with array formula | Excel Worksheet Functions | |||
adding cells within an array | Excel Worksheet Functions | |||
Adding rows to an array | Excel Worksheet Functions | |||
Adding an Array | Excel Programming |