Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim d, St1, St2 St1 = Cells(6, 2) / Cells(21, 2) St2 = Cells(6, 2) / Cells(23, 2) Cells(1, 1) = St1 & "/" & St2 Cells(2, 1) = Len(St1) Cells(3, 1) = Len(St2) x = Len(St1) With Cells(1, 1).Characters(Start:=1, Length:=x).Font .ThemeColor = 6 End With x = x + 1 With Cells(1, 1).Characters(Start:=x, Length:=x + 1).Font .ThemeColor = 2 End With x = Len(St1) + 2 With Cells(1, 1).Characters(Start:=x, Length:=x + 2 + Len(St2)).Font .ThemeColor = 8 End With End Sub
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.