Macro AA_FreqDistributerearranges a series of tables generated by AA_Frequency in such a way that the results for each residue position are collected in a separate table on a separate worksheet Usage:
Sub AA_FreqDistribute() ' Assumption: You have N Frequency-Tables on a worksheet named "Freq", one below the other ' the first one starts in row 1, the second one in row M+1, the third in row 2M+1. ' The first column indicates the content of the row. ' Instead of having each frequency table showing the AA-Frequency as a function of residue number, ' you want to collect the data belonging to one particular residue number in all frequency tables into one table, ' on a separate worksheet N = 10 'number of tables, change this value if you have a different number of tables M = 30 'number of rows per table, change this value if you have a different length of the individual tables For i = 151 To 1 Step -1 Sheets.Add aaa = "Residue_" & (i - 1) ActiveSheet.Name = aaa For j = 1 To N Worksheets("VH").Activate Range(Cells(M * (j - 1) + 1, i + 1), Cells(M * j, i + 1)).Select Selection.Copy Worksheets(aaa).Activate Range(Cells(1, j + 1), Cells(M, j + 1)).Select ActiveSheet.Paste Next j Next i End Sub |
|
|||||||||||||||||
Last Modified by A.Honegger |