Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Elegant solution for two comparisons Joe Murphy[_2_] Excel Discussion (Misc queries) 9 January 25th 08 10:42 PM
Is there an elegant solution to this table? [email protected] Excel Discussion (Misc queries) 3 July 9th 06 01:31 PM
Working Hours (formula & graph) - any elegant solution? markx Excel Worksheet Functions 1 March 29th 06 02:02 PM
how do you select multiple minima in Excel jd110110 Excel Worksheet Functions 1 February 7th 06 07:27 PM
Reference styles and local/non-local formulae - international problems. Alan Howells[_2_] Excel Programming 2 February 24th 04 09:52 AM


All times are GMT +1. The time now is 05:05 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"