Hi All,
I think this might be a programming issue (not sure but I hope it can be solved).
I have three sheets, each containing a table. I'd like users to be able toggle or select rows from these tables for inclusion in a fourth table in a new worksheet.
Unfortunately I have zero knowledge of vba and 0.01 knowledge of macros. I'm attaching a sample of what I'm working with.
In the attached, the "price list," "likely to reference," and "optional" worksheets contain the source tables; I've added a column to the right of each called "include" (where I'd like a user to be able to select a desired row).
The "custom" worksheet is where I'd like an assembled worksheet to live.
If anyone could give me a sense of if this is possible, and how, that would be great.
Thanks in advance!
Last edited by prawer; 08-27-2009 at 04:46 PM.
Have a look, this sheet will assemble itself in realtime on the "custom" sheet. You can put any value at all in column F on the first 3 sheets, it will trigger the "Key" column G as long as the cell isn't blank. The unique index values in the key columns translate to rows in the custom table.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Cool! I'll tinker with it and mark as solved if everything is OK.
Thanks!
One more question:
Is it possible to force a certain sort order for the 'service' field in the "custom" sheet?
That is, not alphabetical, but, for example, Ketchup, then Ground Beef, then Refrigeration?
I've added in a special new function that doesn't exist in Excel, it's called STRING CONCATENATION. This allows you to do a SUMIF() type analysis of a range of values, but instead of adding when values match, it gathers text strings together and lists them together in a cell.
The UDF I installed is called CONCATIF().
http://www.excelforum.com/excel-prog...in-cell.html#2 'explanation
I also added a new CUSTOM2 sheet that you can use to organize the first CUSTOM sheet into the order you want. Just list the items in column A in the order you wish to see them. The CONCATIF() formulas in the other columns will gather the matching items from CUSTOM sheet and display them altogether.
I also added a worksheet_activate event to that Custom2 sheet so the rows/columns autofit to display as good as possible each time you look at that sheet.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Wow, thanks so much!
JBeaucaire and all,
Thank you so much for your help along the way.
I love the way the 'Service' column looks in the sheet Custom2, but I'm wondering if it's possible to keep services 'grouped' in that way without concatenating the service descriptions? The actual descriptions my company is using are much longer than what I used in my sample, so concatenating them makes it confusing.
What I'd like, then, is a kind of reversal of the logic that you used, where the service category does not get repeated in several rows, but service sub-descriptions are demarcated by rows.
Thanks again, and have a great day!
I chose these solutions each step in an attempt to satisfy your wants in terms of layout and my wants in terms of not creating a sheet that grinds to a snail's pace with array-crunching formulas all over the place. That's typically how these things are accomplished and on larger datasets can be truly unweildy.
So to get the items back together in an organized way on Custom2 without introducing too-hungry array formulas seemed best accomplished with the UDF we used.
Now, having CUSTOM or CUSTOM2 organize themselves into a pre-configured list where the list expands/contract on its own, I can't fathom any way without putting those arrays right back in, ugh and more ugh.
The UDF at least keeps it all in one spot and is evaluated one time and one way, always appearing in the same spot.
So, the short answer is, yes it probably could be done, but not without some rethinking of everything you've got so far.
Excel is great at number crunching, but this evaluation of pages of text strings really slows down the plumbing. Perhaps this whole thing would be simpler and more manageable in Access.
========EDIT:
Any chance you'd reconsider this multi-sheet thing and put it altogether in a single "Database" sheet. That would give us back a lot of power and options not having to try and span ordered answers of multiple sheets.
Last edited by JBeaucaire; 08-25-2009 at 07:45 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Appreciate your taking the time to wrestle with this with me.
I really like the concept of the UDF -- the only issue is that, as I said, our actual descriptions occupy several rows, so the line between any two of them is not quite clear if they're string-concatenated.
Single-sheet price list should be fine -- I've attached something to that effect (sheet: "Master Price List"). Hope this can make things easier.
I did all that work taking out those merged cells to give you a parsable data set and now they're all back in again.
Database = 1 row is a complete and separate data line, it includes all the pertinent information for the record. 1 column represents 1 field. Merged fields are for not for databases.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Really sorry JB, I attached the wrong file name. This one has a 'master price list' sheet w/o merged cells, etc.
This one's almost effortless compared to the other.
============
EDIT:
On the other hand, switching to this format also opens up the possibility of using an AUTOFILTER. If you turn on the DATA > FILTER > AUTOFILTER and then filter on column A for "x" only, it gives you the same result as the custom sheet, except you don't need the custom sheet to show it.
Last edited by JBeaucaire; 08-25-2009 at 09:21 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
“None of us is as good as all of us” - Ray Kroc
“Actually, I *am* a rocket scientist.” - JB (little ones count!)
Thanks JB. It all looks good now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks