ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   array probs (https://www.excelbanter.com/excel-programming/350940-array-probs.html)

[email protected][_2_]

array probs
 
hi, hope I can ask this clearly.
a b c d e f g h i j
k l
09/10/2004 14 11 18 Walsall 2 1 Colchester 9 4 3

Im using data laid out as above running from january to December. I
take the data from the worksheet put into a dynamic array, comapre f to
h if the same I then put that data for the row into another array and
paste back to worksheet. That side of I can do fine. But a big
difficulty Icant seem to resolve is that with dates 10/10/2001 -
31/10/2001 & 13/11/2004 - 30/11/2004 & 10/12/2004 - 29/12/2004, when My
program runs on auto from jan to dec these dates dont capture f & g
data. They capture everything else, a,b,c,d,e,g(a space),i,j,k,l. All
the other dates are perfect. Now the strange thing is if I step through
the program (f8), its fine. Whence I cant find the problem. I am using
variables, so I wondering if I should be emptying these after each pass
through. Basically the program takes the first date, if it meets a
criteria, goes of and to another worksheet enters some details, comes
back to original, enters data into array then paste to sheet, emptys
aray and moves to next date. any advice appreciated.
Regards Robert


David Frette[_2_]

array probs
 
I don't quite understand what you are doing and am in a hurry to end my day.
Since you are UK there is time difference .... so I'll answer what I can now.
Maybe someone else will pick up the pieces.

Step 1:
" I am using variables, so I wondering if I should be emptying these after
each pass through. "
Yes. That is a basic principle in using a loop unless you want to compare
one iteration to the next! Most of the time, it's good practice to clear your
variables appropriately at the end of a loop. Do that. If that doesn't solve
it, then do step 2.

Step 2:
Second, use a Debug command (or test g against an empty string, against a
space, and a Null) to break your code.

Step 3:
Get back to us.

" wrote:

hi, hope I can ask this clearly.
a b c d e f g h i j
k l
09/10/2004 14 11 18 Walsall 2 1 Colchester 9 4 3

Im using data laid out as above running from january to December. I
take the data from the worksheet put into a dynamic array, comapre f to
h if the same I then put that data for the row into another array and
paste back to worksheet. That side of I can do fine. But a big
difficulty Icant seem to resolve is that with dates 10/10/2001 -
31/10/2001 & 13/11/2004 - 30/11/2004 & 10/12/2004 - 29/12/2004, when My
program runs on auto from jan to dec these dates dont capture f & g
data. They capture everything else, a,b,c,d,e,g(a space),i,j,k,l. All
the other dates are perfect. Now the strange thing is if I step through
the program (f8), its fine. Whence I cant find the problem. I am using
variables, so I wondering if I should be emptying these after each pass
through. Basically the program takes the first date, if it meets a
criteria, goes of and to another worksheet enters some details, comes
back to original, enters data into array then paste to sheet, emptys
aray and moves to next date. any advice appreciated.
Regards Robert




All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com