PDA

View Full Version : Excel to find value and return multi values based on that



LongJohn
03-11-2012, 01:03 PM
I have created a userform with a workbook that contains "Sheet1" and a second sheet called "Product" I have a button called Butproduct and what I am attempting to do is when this is press it will Search "Sheet1" for Product DA9 and return to sheet "Product" the date and time and the name of customer in colum 2 that ordered the product. I am a newbe to Excel VBA I can get the Userform to write to the different sheets. But dont know where to start with this. I have tried recording a macro but it ends up very long.
I hope I have given you enough info. :banghead: John

Monday Tuesday Wednesday Thursday Friday Saturday Sunday 26/03/2012 9am 27/03/2012 5pm 28/03/2012 5pm 29/03/2012 9am 30/03/2012 9am 31/03/2012 2pm 04/01/2012 9am A1 Byrne DA6 DA10 A1 Jones DA10 DA9 A1 Smith DA9 DA10 A1 Holly DA9 DA9 A1 Butler A1 Marks DA9 A1 Healy DA9 A1 FOGARTY DA9 DA9 DA10 A1 Heaphy DA10 DA10 A1 Long DA10 A1 Bolger DA10 DA10 A1 Good DA10

LongJohn
03-11-2012, 01:07 PM
sorry I will figue out how to insert a table and post shortly#
John

LongJohn
03-11-2012, 01:25 PM
Sorry for my mistake I have attached a sample of my work book I have amended customer names. Hope you can be of help first time using a forum.:help



I have created a userform with a workbook that contains "Sheet1" and a second sheet called "Product" I have a button called Butproduct and what I am attempting to do is when this is press it will Search "Sheet1" for Product DA9 and return to sheet "Product" the date and time and the name of customer in colum 2 that ordered the product. I am a newbe to Excel VBA I can get the Userform to write to the different sheets. But dont know where to start with this. I have tried recording a macro but it ends up very long.
I hope I have given you enough info. :banghead: John

Monday Tuesday Wednesday Thursday Friday Saturday Sunday 26/03/2012 9am 27/03/2012 5pm 28/03/2012 5pm 29/03/2012 9am 30/03/2012 9am 31/03/2012 2pm 04/01/2012 9am A1 Byrne DA6 DA10 A1 Jones DA10 DA9 A1 Smith DA9 DA10 A1 Holly DA9 DA9 A1 Butler A1 Marks DA9 A1 Healy DA9 A1 FOGARTY DA9 DA9 DA10 A1 Heaphy DA10 DA10 A1 Long DA10 A1 Bolger DA10 DA10 A1 Good DA10