LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 159
Default Macro needed to search 2 columns

How could I change the first combobox to only show the first instance of a
value/text? Right now the way it is it shows all the values in column A, so
like I showed the combobox would only show apple,pear,grape, not all the
apples?

"Mekinnik" wrote:

I am trying to create code for my user form that would use a combobox
selection as the first criteria and search cloumn 'B' for every of that value
that has the name within the same row or something like that and add the
values to a combobox drop down list. I would look something like this:

col. 'A' col. 'B'
apple red
apple green
apple yellow
pear green
grape purple
apple pink

for every 'apple' in column 'A' it will add the color in column 'B' to the
drop down list.

I would like this to happen in the userform initialize event, so that when
the second userform opens the dropdown list is allready populated, also if it
doesn't find any matches it will show a msgbox.

 
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
macro or function help needed for adding columns for values missin Arain Excel Discussion (Misc queries) 10 May 17th 07 12:46 AM
merge columns into single report - macro needed aquaflow Excel Discussion (Misc queries) 2 February 5th 07 12:41 PM
Looping macro needed to find intersections of rows and columns Clifford Middleton Excel Programming 1 January 5th 06 01:04 PM
Help needed with macro: Writing contents of two cells to two new columns Big B Excel Programming 0 November 24th 05 04:27 PM
Macro or Formula needed to search data in cells [email protected] Excel Programming 3 May 7th 05 01:52 PM


All times are GMT +1. The time now is 07:12 PM.

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

About Us

"It's about Microsoft Excel"