Re: Data correlation problem
From: Harlan Grove (hrlngrv_at_aol.com)
Date: 04/18/04
- Next message: Norman Harker: "Re: ARM - Adjustable Rate Mortgage"
- Previous message: Ken West: "Excel 2003 and Excel Viewer on a Terminal Server"
- In reply to: Jerry W. Lewis: "Re: Data correlation problem"
- Next in thread: hoyaguru: "Re: Data correlation problem"
- Reply: hoyaguru: "Re: Data correlation problem"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 18 Apr 2004 01:06:08 GMT
"Jerry W. Lewis" <post_a_reply@no_e-mail.com> wrote...
...
>Use a formula like the following
>
>=IF(ISERROR(MATCH(A2,[ETA]Sheet1!$A$2:A:200,0)),E2,
>VLOOKUP(A2,=[ETA]Sheet1!$A$2:B:200,2,FALSE))
...
Copy & paste it a bcith! That second '=' is a syntax error. And if you're
going to use 0 as 3rd arg to MATCH, might as well use it as 4th arg to
VLOOKUP (very picky).
>hoyaguru < wrote:
...
>>Now, I need to take the eta file data and have it update my databse,
>>so when I upload it to my website it shows the out of stock items as
>>"backordered until ###". I made a massive macro that takes each part
>>number one at a time and compares it to all 30,000 line items, puts
>>in the date and then goes onto the next eta item, but it takes a
>>long time to do it each day.
...
If the eta file has many fewer entries than the database (likely if there's
lots of duplicates in your database), then you want to lookup into the
*smaller* table, so don't lookup on the database. That's what Jerry's
formula (once corrected) does.
If this really takes a long time, then make Excel work like an indexed
database. Add a column of original row numbers. Sort the eta table on the
P/N field in ascending order, then sort the augmented database on the P/N
field in ascending order, add eta dates to the database using a formula like
=IF(A3=A2,X2,VLOOKUP(A3,ETA,2))
[yes! no error trapping] fill this down so there's a formula for each
record, select this entire column, copy and paste special as values on top
of itself, with this column still selected, Edit > Goto, Special, select
Constants of Error type and clear the resulting cells, then resort the
database on the added original row number field.
This approach has the advantage of at least halving the number of searches
in ETA. Note that I'm just using ETA as a placeholder for the eta table.
This is offset by the two sorts, but I'll bet it'd work faster. The whole
procedure should be recorded and used as a macro.
- Next message: Norman Harker: "Re: ARM - Adjustable Rate Mortgage"
- Previous message: Ken West: "Excel 2003 and Excel Viewer on a Terminal Server"
- In reply to: Jerry W. Lewis: "Re: Data correlation problem"
- Next in thread: hoyaguru: "Re: Data correlation problem"
- Reply: hoyaguru: "Re: Data correlation problem"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|