Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
I have one number in cell a5. In cells A10:A250 i have the product
numbers. I want to find in area A10:a250 all samme numbers as in cell a5 and display rows in multicolumn box(usreform) where these numbers are. if it is possible I want to display only results from column a,c and f. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
Dim cell as Range
with userform1 .listbox1.Rowsource = "" .listbox1.ColumnCount = 3 .listbox1.clear End With set sh = Worksheets("Sheet1") for each cell in sh.Range("A10:A250") if cell.value = sh.Range("A5").Value then with userform1 .listbox1.additem cell.Value .listbox1.list(.listbox1.listcount,1) = cell.offset(0,2).Value .listbox1.list(.listbox1.listcount,2) = cell.offset(0,5).Value End with end if Next -- Regards, Tom Ogilvy "Alen32" wrote in message lkaboutsoftware.com... I have one number in cell a5. In cells A10:A250 i have the product numbers. I want to find in area A10:a250 all samme numbers as in cell a5 and display rows in multicolumn box(usreform) where these numbers are. if it is possible I want to display only results from column a,c and f. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
where and How to insert this code?
|
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
Do I need make userform with listboxes?
|
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
Well, you said:
I want to find in area A10:a250 all samme numbers as in cell a5 and display rows in multicolumn box(usreform) so yes, you would need to create a userform and put a listbox on it if that is what you want. You could put appropriate code in the userform initialize event, the activate event or tie it to a button depending on what you want your functionality to be. -- Regards, Tom Ogilvy "Alen32" wrote in message lkaboutsoftware.com... Do I need make userform with listboxes? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
also, I had some bad code in my original. I neglected to account for the
fact that the row references in list are zero based, so .listbox1.additem cell.Value .listbox1.list(.listbox1.listcount,1) = cell.offset(0,2).Value .listbox1.list(.listbox1.listcount,2) = cell.offset(0,5).Value should be .listbox1.additem cell.Value .listbox1.list(.listbox1.listcount-1,1) = cell.offset(0,2).Value .listbox1.list(.listbox1.listcount-1,2) = cell.offset(0,5).Value I did account for the zero base for columns. Also, you posted this question earlier. Dick Kusleika responsed to that with a slighty different approach (using FIND) and wrote it as a userform initialize event. so that may be easier for you to implement. -- Regards, Tom Ogilvy "Alen32" wrote in message lkaboutsoftware.com... Do I need make userform with listboxes? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Display multicolumn box
Thanks Tom
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
display multicolumn box | Excel Programming | |||
multicolumn listbox move or value set | Excel Programming | |||
Reordering with Multicolumn Listbox | Excel Programming | |||
Multicolumn Combo Box | Excel Programming | |||
multicolumn Listbox and textalignment | Excel Programming |