genracela
05-26-2010, 11:11 PM
I've a formula that will get the value from my textbox in Column F6
And I think I'm not doing correctly.
The textbox is in column F6
Please help!
Thanks!
Option Explicit
Sub Search()
If UCase(Range("F6").Value) <> "ALL" Then
TextBox1.Value.Range("E9").Formula = "=IF(ISERROR(INDEX(Data!$A:$A,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$A:$A,MATCH($F$6,Data!$E:$E,0)))"
TextBox1.Value.Range("F9").Formula = "=IF(ISERROR(INDEX(Data!$B:$B,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$B:$B,MATCH($F$6,Data!$E:$E,0)))"
TextBox1.Value.Range("G9").Formula = "=IF(ISERROR(INDEX(Data!$C:$C,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$C:$C,MATCH($F$6,Data!$E:$E,0)))"
End If
End Sub
And I think I'm not doing correctly.
The textbox is in column F6
Please help!
Thanks!
Option Explicit
Sub Search()
If UCase(Range("F6").Value) <> "ALL" Then
TextBox1.Value.Range("E9").Formula = "=IF(ISERROR(INDEX(Data!$A:$A,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$A:$A,MATCH($F$6,Data!$E:$E,0)))"
TextBox1.Value.Range("F9").Formula = "=IF(ISERROR(INDEX(Data!$B:$B,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$B:$B,MATCH($F$6,Data!$E:$E,0)))"
TextBox1.Value.Range("G9").Formula = "=IF(ISERROR(INDEX(Data!$C:$C,MATCH($F$6,Data!$E:$E,0))),""No Records"",INDEX(Data!$C:$C,MATCH($F$6,Data!$E:$E,0)))"
End If
End Sub