+ Reply to Thread
Results 1 to 3 of 3

Updating data

  1. #1
    Registered User
    Join Date
    02-03-2009
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Updating data

    Hi,
    I have a Worksheet(stock) of about 30 stock sizes with quantities which from another worksheet(quote) I can check availablity using Vlookup. If the quote then becomes a sale I would like to automatically update the stock sheet quantities against the stock size sold.
    Supposing "Stock" worksheet shows cell A10 is Stock no "115270" and cell B10 shows 20 in stock when I produce my quote I have no problem looking up the stock no and showing the quantity in stock on my quote worksheet say in cell D16 but if I then sell 4 and minus them from the 20 I cant seem to find a way to then update Stock sheet B10 with the new balance. Is there an opposite of Vlookup?
    Last edited by VBA Noob; 02-03-2009 at 01:43 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Updating data

    No, formulaically what you describe would create a circular loop. The only way for a sheet to first see how many of an item is available (VLOOKUP), then on its own sheet SELL some of that product and have that "sale" cause the original "vlookup" result to decrement would be:

    a) having sheet that has the available stock do its own "search" through saved documents and amass its own calculation. This could get weird. The cells being "searched" could not themselves be ones that search the availability sheet...more circular nonsense.

    b) A macro of some sort that actually changes the number in the availability sheet when it's saved. This could be weird, too, since saving the invoice decrements, what happens when you change the sale amount and save again?

    You'll need to think it though pretty carefully before approaching the VB gurus here.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-03-2009
    Location
    Bristol, England
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Updating data

    Thanks for the help
    I agree that a macro of sorts will probably be the best result. The spreadsheet is really only used to record the sale and register a job number. The official invoicing and stock control is done in an accounting package. We just want a check against current stock to ensure we dont oversell which we have done in the past!

+ 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