Hi
I have been using the index and match command in Excel to sort raw data that i receive in different formats into one required format. I paste the data into one worksheet, and using the MATCH command, the column heading from the raw data is matched using the colum heading in the required format. The match command returns the column number and then using the index command and row numbers the values in that column (eg INDEX(rawdata,T5,MATCH("*Dep*",Raw!$A$2:$BZ$2,0)) are matched (i hope this makes sense).
For example, using the Column titles, essentially I am trying to organise Data 1 & Data 2, into Data 3:
Table 1 : ID,DATE,TIME,F,E,D,A,B,C
Table 2 : ID,DATE,TIME,D,F,E,B,C,A
Table 3 :ID,DATE,TIME,A,B,C,D,E,F
The problem i am having is the Column titles do vary quite a bit, (seee Table 4 below)
Table 4 : ID,DATE,TIME,1D,F,E1,B,C,1A
So I have to manually change them to suit, it would be really great if all this could be done with VB code. If someone could just start me with a bit of VB code, that would be great.
Cheers
Ian
I have been using the index and match command in Excel to sort raw data that i receive in different formats into one required format. I paste the data into one worksheet, and using the MATCH command, the column heading from the raw data is matched using the colum heading in the required format. The match command returns the column number and then using the index command and row numbers the values in that column (eg INDEX(rawdata,T5,MATCH("*Dep*",Raw!$A$2:$BZ$2,0)) are matched (i hope this makes sense).
For example, using the Column titles, essentially I am trying to organise Data 1 & Data 2, into Data 3:
Table 1 : ID,DATE,TIME,F,E,D,A,B,C
Table 2 : ID,DATE,TIME,D,F,E,B,C,A
Table 3 :ID,DATE,TIME,A,B,C,D,E,F
The problem i am having is the Column titles do vary quite a bit, (seee Table 4 below)
Table 4 : ID,DATE,TIME,1D,F,E1,B,C,1A
So I have to manually change them to suit, it would be really great if all this could be done with VB code. If someone could just start me with a bit of VB code, that would be great.
Cheers
Ian