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?
Last edited by kwgriffi; 06-26-2009 at 06:39 PM.
Something like this?
Last edited by contaminated; 06-29-2009 at 06:02 PM.
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, «Born in USSR»
Vusal M Dadashev
Baku, Azerbaijan
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
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?
Does it take care of your needs?
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, «Born in USSR»
Vusal M Dadashev
Baku, Azerbaijan
Does it take care of your needs?
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, «Born in USSR»
Vusal M Dadashev
Baku, Azerbaijan
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
Shure
First I'll divide this formula on several parts.
First isCode:=IFERROR(INDEX(B3:B23,SMALL(IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),""),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 formulaCode:=IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),"")
Otherwise it'd return blank.Code:ROW(INDIRECT("1:"&ROWS(3:23)))
This trick prepares array for SMALL() function. This Array something like this
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 alsoCode:"","',"","","","","","","",12,13,14,15,16,17,18,19
'coz it'd return number like 1,2,3,4,5,6... for each cell in the array.Code:ROW(INDIRECT("1:"&ROWS(3:23))),"")
And now it's a time for use INDEX() function after u have got the row number.
So final formula is
included in IFERROR() in order to get rid of #NUM! error,,.Code:=IFERROR(INDEX(B3:B23,SMALL(IF(F2=A3:A23,ROW(INDIRECT("1:"&ROWS(3:23))),""),ROW(INDIRECT("1:"&ROWS(3:23))))),"")
Your issue could be done with the help of using helper columns, but this formula gathers three columns into one.
Люди, питающие благие намерения, как раз и становятся чудовищами.
Regards, «Born in USSR»
Vusal M Dadashev
Baku, Azerbaijan
Bookmarks