Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Macro need to update the workbook

Thanks, Bernie
I've figured it out.


"Bernie Deitrick" wrote:

Well, then the question that must be answered first is this: Is "Equipment ID" a key number that can
never be changed?

If it can be changed, then it is impossible to tell a deletion from a change or a change from an
addition.

If it is never changed, then with the two workbooks open, just use linking formulas based on the key
number. Enter a formula like this in cell B2 of the Live sheet to pull the associated value from the
column B of the update workbook.

=VLOOKUP($A2,'[Updated.xls]Update Sheet'!$A$1:$H$1000,COLUMN(),FALSE)

The use of COLUMN assumes that the data columns are in the same order - which simplifies the
extraction.

IF there is a deletion or addition, you could manually delete the row from the Live sheet - the
VLOOKUP would return errors, which would indicate which row values are no longer available in the
Update sheet. For additions, you could link to the ID column to extract all the values:

='[Updated.xls]Update Sheet'!$A1

copied down, then use formulas like

=IF(ISERROR(MATCH(cell with above formula,$A:$A,False)),"NEW!","")

Copied down to match your link formulas - then filter to find the NEW values...

Or you could use a macro.... but it depends on the ID....

HTH,
Bernie
MS Excel MVP


"x6v87qe" wrote in message
...
Thanks Bernie~!
Actually, the "updated" file is an export from an access query, which holds
the latest equipments status info. The "Live" file is just another worksheet
in regards those equipments. what I thought is: equipments status
query---"updated" xls---"Live" xls
Maybe I can just use the query to update the equipment info, Can I ?
any better options?

Cheers

"Bernie Deitrick" wrote:

The best approach is to simply don't use your "Updated" workbook: make any changes, additions, or
deletions directly in the "Live" workbook. Having data reside in two places is a recipe for
corruption.

HTH,
Bernie
MS Excel MVP


"x6v87qe" wrote in message
...
Hi, All

Basically, I have two workbooks and each of them contains a single worksheet.
The first worksheet namely "Updated" has 8 columns, while the other
worksheet "Live" has 16 columns (8 of them are same with "Update", rest are
different).
However, both of them have a same indicate column "Equipment ID".

What I need is to use the "Updated" sheet to update the "Live" one. That is
whenever, there's a change in the "Equipment ID" of "Update" I need the
changes .including all other 8 columns, to be reflected on the "Live" sheet,
no matter it's an addition, deletion or just change of value.

Did I make myself clear?

Thanks







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
not allow update for workbook w/ Links MarkT Excel Discussion (Misc queries) 9 October 3rd 06 02:16 AM
Update from another sheet in same workbook Scorpvin Excel Discussion (Misc queries) 0 August 22nd 06 04:47 PM
Update a workbook from a script [email protected] Excel Discussion (Misc queries) 1 March 8th 06 02:30 PM
How to Update a link within a workbook Lynne Excel Worksheet Functions 1 January 31st 06 10:41 PM
Update linked cells within a workbook??? Chance224 Links and Linking in Excel 4 January 21st 05 06:33 PM


All times are GMT +1. The time now is 09:17 PM.

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

About Us

"It's about Microsoft Excel"