+ Reply to Thread
Results 1 to 5 of 5

Auto Delete Question

  1. #1
    Registered User
    Join Date
    09-14-2007
    Posts
    16

    Auto Delete Question

    I have created an Excel spreadsheet that I am using to keep a record of all available inventories in stock. I want to know is it possible to create a function that would automatically remove a single item from the total amount available a row when I enter the word “Sold” in the cell corresponding to that item and when all items are sold out would automatically delete that row.

    For example in row 16 I have an Item listed and the number of stock available at 6. I want to enter the word sold and have the number available change to 5, and when that number gets to 0 item the row would delete itseld.
    Last edited by VBA Noob; 09-14-2007 at 04:01 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Hi there,

    I've attached a possible solution for your problem.

    It doesn't actually delete rows where all units are sold, however I've added conditional formatting so that it greys out when everything is gone and there also a button you can press to hide all sold items (might be useful to keep deleted items for audit trails, etc - mais non?)

    Any queries, let me know.

    HTH,

    SamuelT
    Attached Files Attached Files

  3. #3
    Valued Forum Contributor
    Join Date
    09-23-2005
    Location
    Bristol, UK
    MS-Off Ver
    2007
    Posts
    664
    Also saw this thread over at the Programming forum - you could probably use this as well. A button with 'Sold' or the like - enter your stock number then press the button to remove when you sell units:

    http://www.excelforum.com/showthread.php?t=614680

    SamuelT

  4. #4
    Registered User
    Join Date
    09-14-2007
    Posts
    16

    Thanks All

    I will test this out tonight when I get home from work and let you know.

  5. #5
    Registered User
    Join Date
    09-14-2007
    Posts
    16

    Update

    Thanks SamuelT the sample you provided was very close to what I am looking for.

    You have given me another idea using the conditional formatting option only.

    What I am thinking about doing is manually editing the level of stock in inventory only this time when I enter word “sold” whole row automatically changing to dark gray. I have been able to change the color of a single cell when I enter sold but I am unable to figure out how to get the whole row to change colors using conditional formatting?

    Within my spreadsheet Column "E" is where I have the number of available stock in my inventory if located. Each row has a different number in it. So if collum E row 10 had 1 item left available for sale, and on Tuesday I sell it and I enter the word "Sold" Using only the highlight cell rule within conditional formatting but I cant figure out how to change the color of the entire row.

    I hope this makes sense it’s late and I am a little tired so it may not.
    Last edited by whatthe; 09-15-2007 at 03:10 AM.

+ 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