+ Reply to Thread
Results 1 to 13 of 13

Stock Levels, Minus a list of values at the click of a button

  1. #1
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Stock Levels, Minus a list of values at the click of a button

    Hi All,

    I'm trying to create a button that will remove stock.

    We have a column 'E' that lists our current stock levels of professional fireworks in our stores. When we pick a firework show we enter how many units we would like to remove from stock in column 'I' This then gives us a total in money of how much stock we are using.

    What I want to be able to then do is click a button that will take the stock level for say E9 = 8 units and then minus how many we are taking out I9 but this button would replicate this for the whole column rather than having to remove each item individualy.

    Then a simple button to clear all the entries in column I.

    Any help?

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Stock Levels, Minus a list of values at the click of a button

    Hi fireworkcrazy & Welcome to the Forum,

    How about...

    Please Login or Register  to view this content.
    Drop a button on the worksheet and attached this code from a normal module
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Re: Stock Levels, Minus a list of values at the click of a button

    Wow, where do you guys learn this stuff!

    Thanks for the speedy reply. I'll give it a go.

  4. #4
    Registered User
    Join Date
    12-12-2014
    Location
    PL
    MS-Off Ver
    2010
    Posts
    55

    Re: Stock Levels, Minus a list of values at the click of a button

    Edit: already replied to

  5. #5
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Stock Levels, Minus a list of values at the click of a button

    Wow, where do you guys learn this stuff!
    At least for me, from one failed attempt after the next (and a lot of watching the "real" experts and taking notes, many notes).

    And just to clarify, the posted code looks at column I, if a number is found, subtracts column I from column and places the results in column E. Finally, clear's the contents for column I.
    Last edited by jeffreybrown; 03-09-2015 at 01:07 PM.

  6. #6
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Re: Stock Levels, Minus a list of values at the click of a button

    This is fantastic!

    I've changed the

    Dim wsSrc As Worksheet: Set wsSrc = Sheets("Sheet1")

    To reflect the worksheet, but how would I get the macro to run on multiple worksheets?

  7. #7
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Stock Levels, Minus a list of values at the click of a button

    I'm heading out the door for the day and won't be able to get back to this tonight.

    Basically you need to loop for the worksheets, example...

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Re: Stock Levels, Minus a list of values at the click of a button

    Thanks, I hope your off out somewhere nice!

    I was thinking I could list the worksheets rather than get it to do it to all of them worksheet1!worksheet2!worksheet4 etc?

  9. #9
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Stock Levels, Minus a list of values at the click of a button

    You can use an array of sheet names like this:

    Please Login or Register  to view this content.
    for example.
    Remember what the dormouse said
    Feed your head

  10. #10
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Re: Stock Levels, Minus a list of values at the click of a button

    Hi Guys.

    Just getting back to this.

    So I have the following but I don't know where to put the extra lines to make it work for all workbooks.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  11. #11
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Stock Levels, Minus a list of values at the click of a button

    Do you want it to run on all of them?

  12. #12
    Registered User
    Join Date
    03-09-2015
    Location
    Essex, UK
    MS-Off Ver
    2013
    Posts
    6

    Re: Stock Levels, Minus a list of values at the click of a button

    Yes please.

  13. #13
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Stock Levels, Minus a list of values at the click of a button

    And did you mean all worksheets or all workbooks? If the latter, which sheets in each workbook?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to check stock levels using a CSV?
    By Mikec087 in forum Excel General
    Replies: 1
    Last Post: 02-08-2015, 09:58 PM
  2. Identify the earliest expiry date on stock based on current stock levels
    By julie86xx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2013, 01:08 AM
  3. [SOLVED] Stock Control - Alert user to low stock levels.
    By Kaies in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-29-2013, 08:56 AM
  4. Stock levels
    By penzer in forum Excel General
    Replies: 17
    Last Post: 04-01-2008, 05:14 AM
  5. stock levels
    By jamie1234 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2007, 05:40 AM

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