Boa noite!!
Se não estou enganado você baril dois tópicos para falar do mesmo assunto!!
Tente
Private Sub CommandButton1_Click()
Dim FindCol As Range, ModeloRow As Range, Pot As Long
If OptionButton1 Then
Set FindCol = Rows("7:7").Find(what:=ComboBox1.Value, after:=Range("A7"), searchdirection:=xlPrevious)
Else
Set FindCol = Rows("7:7").Find(what:=ComboBox1.Value, after:=Range("A7"), searchdirection:=xlNext)
End If
Set ModeloRow = Range("B:B").Find(what:=ComboBox2.Value)
If Len(TextBox1) > 0 Then
Pot = WorksheetFunction.Match(Val(TextBox1.Value), Range("C" & ModeloRow.Row & ":C" & Cells(Rows.Count, "C").End(xlUp).Row), 0)
Else
Pot = WorksheetFunction.Match(Val(TextBox2.Value), Range("D" & ModeloRow.Row & ":D" & Cells(Rows.Count, "D").End(xlUp).Row), 0)
End If
Label1.Caption = Cells(ModeloRow.Row + Pot - 1, FindCol.Column).Value
End Sub
Existem mil maneiras de preparar Neston. Invente a sua!
http://www.youtube.com/ExpressoExcel
Postado : 16/07/2012 8:45 pm