Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hey, guys. I recently wrote a procedure to get the sum of values in one column based on multiple conditions for several other columns. It first finds the first cell in the first column that matches the first condition and, with offset method, compares the rest of the cells in the row with the other conditions. If all match, it adds the value in the last column to a variable. If it doesn't, it moves on to the next matching row. And it loops until there's no more cell in the first column that match the first condition. The whole process is done in a user-defined function. Hmm.... it works, all right, but the problem is that it takes too~ long.(Maybe longer than array formulas that I tried to walk away from) My source data sheet has about 40,000 records and it's growing longer each month by 2,000 records. I tested the code with the actual datasheet at work, and guess what. It took more than 3 hours(it took about 23 seconds per one query). Thanks to my clumsy coding technique, I goofed around the whole afternoon.(doing other very important things ![]() I didn't want to stop all the fun with Ctrl + Break. ;) Any ideas to improve that? Oh, I'll paste the code later. Thanks. Luke. -- staying ------------------------------------------------------------------------ staying's Profile: http://www.excelforum.com/member.php...o&userid=23230 View this thread: http://www.excelforum.com/showthread...hreadid=384804 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formula with multi tasks | Excel Worksheet Functions | |||
Which function/s should be used on a multi conditional formula? | Excel Discussion (Misc queries) | |||
Multi-conditional count | Excel Worksheet Functions | |||
Multi-Conditional Functions | Excel Worksheet Functions | |||
multi conditional searching | Excel Worksheet Functions |