Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default display multicolumn box

Alen

Here's an example of how to do that

Private Sub UserForm_Initialize()

Dim rFound As Range
Dim sFirstAdd As String
Dim rLook As Range
Dim rValue As Range

Set rValue = Sheet1.Range("A5")
Set rLook = Sheet1.Range("A10:A250")
Me.ListBox1.ColumnCount = 4

Set rFound = rLook.Find(rValue.Value, , , xlWhole)

If Not rFound Is Nothing Then
sFirstAdd = rFound.Address

Do
With Me.ListBox1
.AddItem rFound.Row
.List(.ListCount - 1, 1) = rFound.Value
.List(.ListCount - 1, 2) = rFound.Offset(0, 2).Value
.List(.ListCount - 1, 3) = rFound.Offset(0, 5).Value
End With

Set rFound = rLook.FindNext(rFound)
Loop Until rFound.Address = sFirstAdd
End If

End Sub

For more on the Find method
http://www.dicks-blog.com/archives/2...e-find-method/

For more on populating mulitcolumn listboxes
http://www.dicks-blog.com/archives/2...stboxcombobox/

--
Dick Kusleika
Excel MVP
Daily Dose of Excel
www.dicks-blog.com

Alen32 wrote:
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multicolumn listbox move or value set Andrew Smith Excel Programming 3 August 25th 04 05:18 AM
Reordering with Multicolumn Listbox asmenut Excel Programming 2 August 17th 04 01:53 PM
Multicolumn Combo Box PokerDude Excel Programming 2 January 29th 04 04:02 PM
multicolumn Listbox and textalignment John Holland Excel Programming 3 September 11th 03 01:45 AM
Values in a MultiColumn Listbox Tom Ogilvy Excel Programming 5 September 5th 03 08:30 PM


All times are GMT +1. The time now is 04:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"