ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Search for Quote (https://www.excelbanter.com/excel-programming/387505-search-quote.html)

Andri

Search for Quote
 
Dear All,

I have in sheet A, all the quotation about Parts. Which consist of fields
Part Number, description, unit price, Qty Offer, Remark (5 Fields).

then i would like to to display that quotation in Sheet B if i am entering
certain requested Part Number (the entry will be at A1)
Then the VBA code will display then starting Row 2, ALL RECORDS for the
requested Part Number.

Auto Filter is workable but i need the guidance by VBA.

Please guide how to implement it.

TIA,
Andri


Tom Ogilvy

Search for Quote
 
http://www.rondebruin.nl/copy5.htm
the above site has plenty of sample code on using autofilter. While it
isn't specific to your situation, it should be easy to adapt to what you ask
for.

--
Regards,
Tom Ogilvy


"Andri" wrote:

Dear All,

I have in sheet A, all the quotation about Parts. Which consist of fields
Part Number, description, unit price, Qty Offer, Remark (5 Fields).

then i would like to to display that quotation in Sheet B if i am entering
certain requested Part Number (the entry will be at A1)
Then the VBA code will display then starting Row 2, ALL RECORDS for the
requested Part Number.

Auto Filter is workable but i need the guidance by VBA.

Please guide how to implement it.

TIA,
Andri


Bob Phillips

Search for Quote
 
Dim LastRow As Long
Dim rng As Range

LastRow = Cells(Rows.Count, "A").End(xlUp).Row
Set rng = Range("A2").Resize(LastRow - 1)
rng.AutoFilter Criteria1:="=" & Range("A1").Text, field:=1


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Andri" wrote in message
...
Dear All,

I have in sheet A, all the quotation about Parts. Which consist of fields
Part Number, description, unit price, Qty Offer, Remark (5 Fields).

then i would like to to display that quotation in Sheet B if i am entering
certain requested Part Number (the entry will be at A1)
Then the VBA code will display then starting Row 2, ALL RECORDS for the
requested Part Number.

Auto Filter is workable but i need the guidance by VBA.

Please guide how to implement it.

TIA,
Andri





All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com