Re: Function Help... Search?/Match?/Vlookup?/
From: Tom Ogilvy (twogilvy_at_msn.com)
Date: 10/28/04
- Next message: Tom Ogilvy: "Re: Autofill"
- Previous message: Tom Ogilvy: "Re: Update PivotTable Range with a button"
- In reply to: Mcasteel: "VBA: Function Help... Search?/Match?/Vlookup?/"
- Next in thread: MJ: "Re: VBA: Function Help... Search?/Match?/Vlookup?/"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 28 Oct 2004 09:27:33 -0400
Private Sub CommandButton1_Click()
Dim rng as Range
With Worksheets(1)
set rng = .Columns(6).Find( _
Textbox1.Text)
if not rng is nothing then
txtLname.Text = .Cells(rng.row,3).Value
txtFname.Text = .Cells(rng.row,4).Value
' as so forth
Else
msgbox "Customer Data not found"
End if
End With
End Sub
-- Regards, Tom Ogilvy "Mcasteel" <Mcasteel.1eu7de@excelforum-nospam.com> wrote in message news:Mcasteel.1eu7de@excelforum-nospam.com... > > Im trying to look up a specific SSN from Column F. The End-User will > input a Customer SSN that they are looking for into a text box > (txtCustSSN). > > If the SSN is found, I want to return the customers Lname, Fname, > Info1, and Info2 back to my customized form. If the SSN is not found I > want to return msgbox "Customer Data not Found". > > _Data:_ > Column A = Date > Column B = Type > Column C = Lname > Column D = Fname > Column E = Mname > Column F = SSN > Column G = Info1 > Column H = Info2 > > ANY IDEAS ON HOW TO SEARCH A COLUMN OF OR 300+ SSN'S TO \"MATCH\" THE > SSN THAT THE END-USER INPUTS INTO THE TEXT BOX TXTCUSTSSN? > > Ive been having a really hard time with this, please respond with as > much info as you can. > > Thank you! > > > -- > Mcasteel > ------------------------------------------------------------------------ > Mcasteel's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15698 > View this thread: http://www.excelforum.com/showthread.php?threadid=273166 >
- Next message: Tom Ogilvy: "Re: Autofill"
- Previous message: Tom Ogilvy: "Re: Update PivotTable Range with a button"
- In reply to: Mcasteel: "VBA: Function Help... Search?/Match?/Vlookup?/"
- Next in thread: MJ: "Re: VBA: Function Help... Search?/Match?/Vlookup?/"
- Messages sorted by: [ date ] [ thread ]