+ Reply to Thread
Results 1 to 14 of 14

update a excel sheet through another excel sheet

  1. #1
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    update a excel sheet through another excel sheet

    i have a excel file "stock update.xls"

    And a "file stock.xls"...this file get updated every day

    Now, i want to update each and every item of the "stock update.xls" file through "file stock.xls"

    for this i want to create a macro which should open the stock.xls from its saved folder say..c:/temp/stock..

    and to check the items within stock.xls and if there is any changes it should update the "stock update.xls" accordingly.

    kindly help...

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520
    If you can give us more details of both workbooks data structure it would help to get an answer. Ex: what column are we to match on? Ex: Is it a item number, item description? what column has the quantity to change?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    well,
    have to see the item code 1st column of stock.xls & to update the value i.e the quantity against each item in the "stock update.xls"

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: update a excel sheet through another excel sheet

    Ok we now know the Item code to lookup/match is in column A, but now what column Is the quantity in? Also are both Item codes in In column A.
    If you can upload both workbooks it would same you some time, and would help get an answer.

  5. #5
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    have attached the two files...
    kindly help on the same..
    thanks
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    the stock.xls file gets updated everyday...

  7. #7
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: update a excel sheet through another excel sheet

    @aniketpathhak

    None of the codes in stock update.xlsx are in stock.xlsx? What exactly are you wanting to due?

  8. #8
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    oops!! so sorry..
    uploaded the same again with correction
    Attached Files Attached Files

  9. #9
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: update a excel sheet through another excel sheet

    @aniketpathak.nift

    Ok now I got the workbooks and see the are Item Numbers in each Workbook. Now Explain Exactly what is to happen. Looking at your first post its still not clear. What Workbook is to be updated? What Column is to be updated?

    i have a excel file "stock update.xls"

    And a "file stock.xls"...this file get updated every day

    Now, i want to update each and every item of the "stock update.xls" file through "file stock.xls"

    for this i want to create a macro which should open the stock.xls from its saved folder say..c:/temp/stock..

    and to check the items within stock.xls and if there is any changes it should update the "stock update.xls" accordingly.

  10. #10
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    the "stock.xls" file has item code and L column has in hand value which has to be look and update in "stock update.xls" stock column(column E)...

    Also the stock.xls gets update every day n gt saved in c:/temp/stock...the macro should open this file everyday and do the above check and should close it after

    reading the values.

    thanks for you help..

  11. #11
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: update a excel sheet through another excel sheet

    @aniketpathak.nift,

    Ok see if this will work for you. The UpdateStockData.xlsm Workbook will open and get the Item numbers and OnHand Amounts from stock.xlsx and then open and compare Item Numbers and STOCK in the stock update.xlsx, If OnHand <> STOCK then it will update with new value from stock.xlsx.

    You FIRST will need to CHANGE the Const PATHS to your WORKBOOKS at the top of the Code before running updateStock Macro. After you change the paths click the button to test.


    stock.xlsx
    UpdateStockData.xlsm
    stock update.xlsx

  12. #12
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    @mike
    Thanks will revert if came across ne prob..
    Thanks A ton

  13. #13
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    @Mike

    The updation should be done in the stockupdate.xls only (macro should be assign within the stockupdate.xls only)

    Inhand quantity from stock.xls should be updated in stock column in stockupdate.xls

    Thanks

  14. #14
    Registered User
    Join Date
    08-01-2012
    Location
    New delhi
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: update a excel sheet through another excel sheet

    Attaching the two files

    1-Product wise status.xls

    2-Reco file.xls (which gets updated every day)

    Have to update the New stock column of Product wise status.xls in sheets from 1-7

    from reco file..column A (row label) is the codes which is there in Product wise status.xls.

    The changes has to be done within Product wise status.xls.

    As the size of reco file is large have deleted some of the rows...

    Srry fr the inconvenience

    thanks
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1