double array
I have to process 4-7 sheets with similar columns. WHat i
have to do is I have to search for the column heading "GF", "Total" in all the sheets (all sheets are exactly similar). Ihave to also search for last rows in all the sheets. THis is simple as i can create array of variables. Like i can store lastrow(1)...of sheetone and likewise. But the confusing part is when i have to trap a series of values in an array in each sheet. Here i feel i need to create double arrays. Like if i am on sheet 1 then something like trapCelValue(sht1,counter1) so sht1 will be the variable which stores sheet numbers.... and counter1 will be the counter for storing hte values. like in sheet1 i will have to store values like : 13, 18, 45, 22, 90 so my array should be trapCelValue(1,1)="13" trapCelValue(1,2)="18" trapCelValue(1,3)="45" trapCelValue(1,4)="22" trapCelValue(1,5)="90" i am slightly confused as to how to declare and process... any simple example will be helpful thanks a lot |
double array
Just declare a 2D array:
Dim trapCelValue(1 To 5, 1 To 10) As String You seem to be treating the numbers as text as you have enclosed them in quotes. Or you could remove the quotes and declare trapCelValue as a numeric data type. Substitute the actual upper bounds for 5 and 10. -- Vasant wrote in message ... I have to process 4-7 sheets with similar columns. WHat i have to do is I have to search for the column heading "GF", "Total" in all the sheets (all sheets are exactly similar). Ihave to also search for last rows in all the sheets. THis is simple as i can create array of variables. Like i can store lastrow(1)...of sheetone and likewise. But the confusing part is when i have to trap a series of values in an array in each sheet. Here i feel i need to create double arrays. Like if i am on sheet 1 then something like trapCelValue(sht1,counter1) so sht1 will be the variable which stores sheet numbers.... and counter1 will be the counter for storing hte values. like in sheet1 i will have to store values like : 13, 18, 45, 22, 90 so my array should be trapCelValue(1,1)="13" trapCelValue(1,2)="18" trapCelValue(1,3)="45" trapCelValue(1,4)="22" trapCelValue(1,5)="90" i am slightly confused as to how to declare and process... any simple example will be helpful thanks a lot |
All times are GMT +1. The time now is 08:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com