Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
elegant programmed solution to local minima with constraints
I have several columns of data that I create from a database query, I
analyze it, and then publish to a web page and then I can refresh the output analysis report from the htm. One of the things I need to do is find a minimal date value subject to constraints such that the first column is equal to a variable search value and the second column is equal to a fixed text string value. The data in the first and second columns can have duplicate entries. example c55, hello, monday c55, goodbye, tuesday c55, hello, wednesday c46, hello, monday c46, goodbye, tuesday c46, goodbye, friday etc. I'm looking for the earliest date a first column entry said goodbye, for example. So my first local min is c55, goodbye, first on tuesday. The second local min is c46 said goodbye first on tuesday, etc. The database is active so each refresh would requery and bring back new entries and data. I can see a few ways to do this with brute force by either doing some sorting and filtering and maybe lookup functions inside excel. I think I could also just brute force my way through a macro vba program and just loop through the list to find the local min for each entry criteria constraint. But this would be a slow search. What I'm hoping for is something more elegant that would run fairly fast in a table of around 20,000 row entries. Something in VBA so that I can refresh from the html and have a new report published without going back into excel each time. I'm willing to do the programming work I'm just looking for some tips to head me down the right path. Thanks Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Elegant solution for two comparisons | Excel Discussion (Misc queries) | |||
Is there an elegant solution to this table? | Excel Discussion (Misc queries) | |||
Working Hours (formula & graph) - any elegant solution? | Excel Worksheet Functions | |||
how do you select multiple minima in Excel | Excel Worksheet Functions | |||
Reference styles and local/non-local formulae - international problems. | Excel Programming |