| A | B | C | D |
1 | | Test1 | Test2 | Test3 |
2 | Test1 | | ja | ja |
3 | Test2 | ja | | ja |
4 | Test3 | nein | ja | |
Excel Tabellen im Web darstellen >> Excel Jeanie HTML 4
Gruß Dennis
Betrifft: AW: In Übersicht suchen
von: Matthias G
Geschrieben am: 08.09.2006 20:07:27
Hallo Dennis,
z.B. so:
Option Explicit
Const tabelle = "Tabelle1" 'Tabellenname
Private Sub ComboBox1_Change()
Berechne
End Sub
Private Sub ComboBox2_Change()
Berechne
End Sub
Private Sub UserForm_Initialize()
Dim i As Long
With Sheets(tabelle)
i = 2
Do While .Cells(i, 1) <> ""
ComboBox1.AddItem .Cells(i, 1)
i = i + 1
Loop
i = 2
Do While .Cells(1, i) <> ""
ComboBox2.AddItem .Cells(1, i)
i = i + 1
Loop
End With
End Sub
Sub Berechne()
Dim z As Long, s As Integer
On Error Resume Next
With Sheets(tabelle)
z = WorksheetFunction.Match(ComboBox1, .Range("A:A"))
s = WorksheetFunction.Match(ComboBox2, .Range("1:1"))
If z > 0 And s > 0 Then
TextBox1 = .Cells(z, s)
Else
TextBox1 = "?"
End If
End With
End Sub
Gruß Matthias