IntroductionNumberingSequencesStructuresModellingMacrosPublicationsLinks
ColoringSequence StatisticsRenumberingAccessibilityTorsion AnglesStructural VariabilityHydrogen BondsDownloads

Macro STR_ColorAlig

xxx.

Usage:

  • xxx
  • xxx

Cauton:

xxx

Sub Str_ColorAlig()

'get extent of current selection
i1 = Selection.Row
i2 = i1 + Selection.Rows.Count - 1
j1 = Selection.Column
j2 = j1 + Selection.Columns.Count - 1

Sheets("Alig").Select

For i = i1 To i2
    For j = j1 To j2

        If IsEmpty(Sheets("Dist").Cells(i, j)) Then
            k = 1 'black
            ElseIf Sheets("Dist").Cells(i, j).Value > 4 Then
                k = 33 'red
                ElseIf Sheets("Dist").Cells(i, j).Value > 2 Then
                    k = 34 'orange-red
                    ElseIf Sheets("Dist").Cells(i, j).Value > 1.5 Then
                        k = 35 'orange
                        ElseIf Sheets("Dist").Cells(i, j).Value > 1 Then
                            k = 36 'orange-yellow
                            ElseIf Sheets("Dist").Cells(i, j).Value > 0.5 Then
                                k = 37 'yellow
                                Else
                                    k = 2 'white
        End If

        Cells(j, i).Select

        With Selection.Interior
            .ColorIndex = k
            .Pattern = xlSolid
        End With

    Next j
Next i
End Sub
AAAAA Homepage Zürich University Dept. of Biochemistry Plückthun Group Annemarie Honegger

Last Modified by A.Honegger Wednesday, January 26, 2005