display the results from range of columns when combobox is selected
Hello,
I am attaching a spreadsheet, where column A values are selected in a combobox, the corresponding values in the country range gets i.e from Column B to Column S gets populated in listbox.
For example when user selects Yacht gloss in combobox, then its value 8605.668 gets displayed in listbox and its column header Netherlands gets displayed in a textbox
Re: display the results from range of columns when combobox is selected
probably need to use the listindex of the combobox to return the row containing the data, else use vlookup or find to return the value of cells in the same row /column
as i can not open your workbook i can suggest working code
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Re: display the results from range of columns when combobox is selected
Hi westconn1,
can you please suggest a sample code, which based on 4 columns makes a simple search in worksheet and shows the results in the listbox. the 4 column selection will come from 4 different comboboxs.. can you suggest a simple code, as I am new to vba dont know where to start with
Re: display the results from range of columns when combobox is selected
save your sample as .xls and reattach, as i can not open later versions, i will then have a look
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case. Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Re: display the results from range of columns when combobox is selected
I have managed to code the above requirement, but when real time data is added,through excel sheets with about 37k records, it takes about 7 to 10 minutes to populate the details, although its just doing normal filter criteria and populating the results.is their any way to increase the performance of the userform?
Re: display the results from range of columns when combobox is selected
I am attaching the form code as text along with this email, can you please look at it and tell me why its taking so much time to populate the results. Could you kindly improve the performance , by replacing anything in this code , by a different way?