[SOLVED] Two search category & two search terms


"Excel VBA Help"

 


Play Friv Now - Play Friv Games
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Excel Forum
Our Info Pages:-
The Code Cage - Microsoft Office help

Notices

Microsoft Excel Forum Members Post questions in this forum if they are related to using Microsoft Excel, this includes Worksheet Functions, Excel VBA Programming, Simple Macro Code & Charting, Excel formula etc.

New Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 23rd May 2010, 01:48
avk's Avatar
avk
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Two search category & two search terms
     Excel: General   


------ Register to get rid of these "In Post" ads! ------

Category: Excel: General   


Hello friend

Using excel 2003. I have one excel file & in sheet1 i have lot of data.
Data record as per below
column a1 : is header 1 to h1: is header 8
column a2 : application code
column b2 : partno
column c2 : description
column d2 : remark
column e2 : qty

Right now i have search only one base category & one search terms. i.e.
search category : select header3 & search term : piston.


Actually i required two category & two search terms.
For example: If In first search category if i have select "Header 1" &
enter in search term : "02.2115" (applicationcode) & another search
category if i have select "Header 3" & enter in search term : "piston"
(description).
If application is 02.2115 & description is piston, then which partno is
used?

In search (list box) result i want to display
...applicationcode : " "
...partno : " "
...description : " "
...remark : " "
...qty : " "

In view of the above please explain. Hope you will guide me. Thanks.

I have sample attach file


+-------------------------------------------------------------------+
|Filename: SEARCH1.zip |
|Download: http://www.excelbanter.com/attachmen...achmentid=151|
+-------------------------------------------------------------------+



--
avk

The Code Cage Advertisment
Advertisement
  #2  
Old 23rd May 2010, 11:10
joel's Avatar
joel joel is offline
Expert Member
MS Office Version: MS Office 97
MS Office Skill Level: New to MS Office
 
Join Date: Apr 2009
Age: 61
Posts: 1,252
Posts Per Day: 0.40
My Top Tip Count: 0
Thanks to others: 0
Thanked 6 Times in 6 Posts
Reputation: 220 (23) joel has a spectacular aura aboutjoel has a spectacular aura aboutjoel has a spectacular aura about
Default Re: Two search category & two search terms

------ Register to get rid of these "In Post" ads! ------


I assume you are writing a macro. To enter multiple items in a listbox you need to set the list box to multi-column not multirow.

To get a box with multiple rows you can do something like this

appcode = "abc"
partno = "123"
Desc = "hello"
remark = "goodby"
qty = 100
msgbox("applicationcode : " & appcode & vbcrlf & _
"partno : " & partno & vbcrlf & _
"description : " & Desc & vbcrlf & _
"remark : " & remark & vbcrlf _
"qty : " & qty)

  #3  
Old 23rd May 2010, 12:18
Ron Rosenfeld's Avatar
Ron Rosenfeld
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Re: Two search category & two search terms

------ Register to get rid of these "In Post" ads! ------


On Sat, 22 May 2010 20:33:58 +0100, avk <avk.63e3089@excelbanter.com> wrote:

>
>Hello friend
>
>Using excel 2003. I have one excel file & in sheet1 i have lot of data.
>Data record as per below
>column a1 : is header 1 to h1: is header 8
>column a2 : application code
>column b2 : partno
>column c2 : description
>column d2 : remark
>column e2 : qty
>
>Right now i have search only one base category & one search terms. i.e.
>search category : select header3 & search term : piston.
>
>
>Actually i required two category & two search terms.
>For example: If In first search category if i have select "Header 1" &
>enter in search term : "02.2115" (applicationcode) & another search
>category if i have select "Header 3" & enter in search term : "piston"
>(description).
>If application is 02.2115 & description is piston, then which partno is
>used?
>
>In search (list box) result i want to display
>..applicationcode : " "
>..partno : " "
>..description : " "
>..remark : " "
>..qty : " "
>
>In view of the above please explain. Hope you will guide me. Thanks.
>
>I have sample attach file
>
>
>+-------------------------------------------------------------------+
>|Filename: SEARCH1.zip |
>|Download: http://www.excelbanter.com/attachmen...achmentid=151|
>+-------------------------------------------------------------------+


Due to fear of viruses, I rarely download stuff from the web. But your problem
seems to me to be one that could be solved, in principal, by using the Advanced
Filter. In the Criteria Range, you can specify multiple combinations of terms.
--ron

The Code Cage Advertisment
Advertisement
  #4  
Old 2nd June 2010, 13:49
avk's Avatar
avk
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Re: Two search category & two search terms

------ Register to get rid of these "In Post" ads! ------



Awaiting for reply.


+-------------------------------------------------------------------+
+-------------------------------------------------------------------+



--
avk

  #5  
Old 2nd June 2010, 14:12
Steve Dunn's Avatar
Steve Dunn
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Re: Two search category & two search terms

------ Register to get rid of these "In Post" ads! ------


Like most, if not all, of the people helping here, I will not open an
attached file, but your explanation is almost sufficient. Assuming your
criteria are in J1 and L1, and your results are in J2:N2, you could use this
in J2:

=INDEX($A$1:$H$5,MATCH(1,INDEX(($A$1:$A$5=$J$1)*
($C$1:$C$5=$L$1),),0),COLUMN()-COLUMN($J$2)+1)

copied along to N2.

HTH
Steve D.


"avk" <avk.64c0844@excelbanter.com> wrote in message
news:avk.64c0844@excelbanter.com...
>
> Awaiting for reply.
>
>
> +-------------------------------------------------------------------+
> +-------------------------------------------------------------------+
>
>
>
> --
> avk



  #6  
Old 2nd June 2010, 14:19
Bob I's Avatar
Bob I
Newsgroup Contributor
 
Posts: n/a
Posts Per Day: 0
My Top Tip Count:
Default Re: Two search category & two search terms

------ Register to get rid of these "In Post" ads! ------


You have 2 replies the day following your posting.

avk wrote:

> Awaiting for reply.
>
>
> +-------------------------------------------------------------------+
> +-------------------------------------------------------------------+
>
>
>



The Code Cage Advertisment
Advertisement
New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
category, search, terms

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

The Code Cage Affilliates



http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 15:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright ©2008 - , Simon lloyd.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University
X vBulletin 3.8.7 Debug Information
  • Page Generation 0.18731 seconds
  • Memory Usage 6,409KB
  • Queries Executed 19 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footerEnd
  • (1)ad_footerStart
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_headerEnd
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_leftcolumn_code
  • (1)ad_navbar_below
  • (3)ad_postbit_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)helpful_answers
  • (1)helpfulanswers_javascript
  • (1)navbar
  • (3)navbar_link
  • (2)navbar_noticebit
  • (41)option
  • (6)post_thanks_box
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_ctoptip
  • (1)postbit_onlinestatus
  • (3)postbit_reputation
  • (6)postbit_wrapper
  • (1)showthread_changepostsowner_link
  • (1)showthread_extra_fields
  • (1)showthread_quickreply_mrgdp
  • (1)showthread_reason_popup
  • (1)spacer_close
  • (1)spacer_open
  • (1)su_form
  • (3)tagbit
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_datastore.php
  • ./includes/class_hook.php
  • ./awcoding/plugins/awc.php
  • ./awcoding/plugins/ds.php
  • ./awcoding/plugins/ss.php
  • ./includes/functions_notice.php
  • ./mobiquo/smartbanner.php
  • ./mobiquo/include/classTTConnection.php
  • ./mobiquo/smartbanner/head.inc.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/vbatags.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php
  • ./includes/functions_misc.php
  • ./includes/functions_prefix.php 

Hooks Called:
  • init_startup
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_check_criteria
  • notices_noticebit
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • helpfulanswers_showthreadorpost
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • helpfulanswers_show_normal
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • error_fetch
  • reputation_power
  • reputation_image
  • postbit_imicons
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete