Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-26-2009, 06:33 PM
kwgriffi kwgriffi is offline
Registered User
 
Join Date: 26 Jun 2009
Location: Los Angeles, CA
MS Office Version:Excel 2007
Posts: 4
kwgriffi is becoming part of the community
Find & Retrieve a Set of Data

Please Register to Remove these Ads

I consolidate data for many different regions... which should not be able to see each others' sales data...

I have a column that indicates the region and then the sales data by sales person.

I've created a drop down box (through data validation) to allow a user to select their territory, however what is the best way for me to get the data from my list to return once a territory is selected?

Other things to note, each territory has a different number of sales people, and certain territories have subtotals for states, which is the way I'd like the data to be shown to the user.

I've created password restrictions with VBA to prevent users to only see the territories they have access to in the dropdown box.

What I need, specifically, is FIND the territory that is selected, and then copy all of that info (with varying numbers of lines, but all with that territory at the start) and return it in the exact format as I have in my list.

Is this possible?
Attached Files
File Type: xlsm Example.xlsm (11.5 KB, 4 views)

Last edited by kwgriffi; 06-26-2009 at 06:39 PM.
Reply With Quote
  #2  
Old 06-26-2009, 07:13 PM
contaminated contaminated is offline
Valued Forum Contributor
 
Join Date: 07 May 2009
Location: Baku, Azerbaijan
MS Office Version:Excel 2003/2007
Posts: 657
contaminated is very confident of their ability contaminated is very confident of their ability contaminated is very confident of their ability
Send a message via MSN to contaminated Send a message via Yahoo to contaminated
Re: Find & Retrieve a Set of Data

Something like this?
__________________
Regards
Vusal M. Dadashev
Baku, Azerbaijan




Не имея собственного мнения, советы других никогда не будут достаточны
Öz fikirin olmasa, digərlərin məsləhəti sənə heçvaxt kömək ola bilməz.


The only way to read a book of excel formulas without being bored is to open it at random and, having found something that interests you, close the book and meditate.

Last edited by contaminated; 06-29-2009 at 06:02 PM.
Reply With Quote
  #3  
Old 06-26-2009, 07:24 PM
kwgriffi kwgriffi is offline
Registered User
 
Join Date: 26 Jun 2009
Location: Los Angeles, CA
MS Office Version:Excel 2007
Posts: 4
kwgriffi is becoming part of the community
Re: Find & Retrieve a Set of Data

No, I am again not looking to subtotal the information I have, but to have a drop down return a set of data from a list, when the list contains formatting a various numbers of rows
Reply With Quote
  #4  
Old 06-26-2009, 07:26 PM
kwgriffi kwgriffi is offline
Registered User
 
Join Date: 26 Jun 2009
Location: Los Angeles, CA
MS Office Version:Excel 2007
Posts: 4
kwgriffi is becoming part of the community
Re: Find & Retrieve a Set of Data

im a fool... i see now you put in the formulas

this is very close, but it does not contain the formmating I would like to include... is this possible?
Reply With Quote
  #5  
Old 06-26-2009, 08:04 PM
contaminated contaminated is offline
Valued Forum Contributor
 
Join Date: 07 May 2009
Location: Baku, Azerbaijan
MS Office Version:Excel 2003/2007
Posts: 657
contaminated is very confident of their ability contaminated is very confident of their ability contaminated is very confident of their ability
Send a message via MSN to contaminated Send a message via Yahoo to contaminated
Re: Find & Retrieve a Set of Data

Does it take care of your needs?
__________________
Regards
Vusal M. Dadashev
Baku, Azerbaijan




Не имея собственного мнения, советы других никогда не будут достаточны
Öz fikirin olmasa, digərlərin məsləhəti sənə heçvaxt kömək ola bilməz.


The only way to read a book of excel formulas without being bored is to open it at random and, having found something that interests you, close the book and meditate.
Reply With Quote
  #6  
Old 06-26-2009, 08:05 PM
contaminated contaminated is offline
Valued Forum Contributor
 
Join Date: 07 May 2009
Location: Baku, Azerbaijan
MS Office Version:Excel 2003/2007
Posts: 657
contaminated is very confident of their ability contaminated is very confident of their ability contaminated is very confident of their ability
Send a message via MSN to contaminated Send a message via Yahoo to contaminated
Re: Find & Retrieve a Set of Data

Does it take care of your needs?
Attached Files
File Type: xlsx Example(1) with formatting.xlsx (13.1 KB, 4 views)
__________________
Regards
Vusal M. Dadashev
Baku, Azerbaijan




Не имея собственного мнения, советы других никогда не будут достаточны
Öz fikirin olmasa, digərlərin məsləhəti sənə heçvaxt kömək ola bilməz.


The only way to read a book of excel formulas without being bored is to open it at random and, having found something that interests you, close the book and meditate.
Reply With Quote
  #7  
Old 06-26-2009, 08:09 PM
kwgriffi kwgriffi is offline
Registered User
 
Join Date: 26 Jun 2009
Location: Los Angeles, CA
MS Office Version:Excel 2007
Posts: 4
kwgriffi is becoming part of the community
Re: Find & Retrieve a Set of Data

can you help me understand how you created the array? I am having difficulty with the help to understand how to modify this to my existing data set where I have a larger sample
Reply With Quote
  #8  
Old 06-26-2009, 08:41 PM
contaminated contaminated is offline
Valued Forum Contributor
 
Join Date: 07 May 2009
Location: Baku, Azerbaijan
MS Office Version:Excel 2003/2007
Posts: 657
contaminated is very confident of their ability contaminated is very confident of their ability contaminated is very confident of their ability
Send a message via MSN to contaminated Send a message via Yahoo to contaminated
Re: Find & Retrieve a Set of Data

Shure

First I'll divide this formula on several parts.
Code:
=IFERROR(INDEX(B3:B23,SMALL(IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),""),ROW(INDIRECT("1:"&ROWS(3:23))))),"")
First is
Code:
=IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),"")
This formula checks availability of the item selected in dropdown list in A3:A23. If so it'd return their row number generated with formula
Code:
ROW(INDIRECT("1:"&ROWS(3:23)))
Otherwise it'd return blank.
This trick prepares array for SMALL() function. This Array something like this
Code:
"","',"","","","","","","",12,13,14,15,16,17,18,19
Each of this item separated with comma means cell. So without SMALL() function you will get your values somwhere at the bottom. SMALL() allows you to gater 'em at the top. Bur SMALL() has two arguments: RANGE and K. So for K is also
Code:
ROW(INDIRECT("1:"&ROWS(3:23))),"")
'coz it'd return number like 1,2,3,4,5,6... for each cell in the array.
And now it's a time for use INDEX() function after u have got the row number.
So final formula is
Code:
=IFERROR(INDEX(B3:B23,SMALL(IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),""),ROW(INDIRECT("1:"&ROWS(3:23))))),"")
included in IFERROR() in order to get rid of #NUM! error,,.
Your issue could be done with the help of using helper columns, but this formula gathers three columns into one.
Attached Files
File Type: xlsx Example(1) with explanation.xlsx (11.4 KB, 5 views)
__________________
Regards
Vusal M. Dadashev
Baku, Azerbaijan




Не имея собственного мнения, советы других никогда не будут достаточны
Öz fikirin olmasa, digərlərin məsləhəti sənə heçvaxt kömək ola bilməz.


The only way to read a book of excel formulas without being bored is to open it at random and, having found something that interests you, close the book and meditate.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump