+ Reply to Thread
Results 1 to 7 of 7

Chemical Inventory: Making expired sheet from below

Hybrid View

  1. #1
    Registered User
    Join Date
    12-19-2014
    Location
    US
    MS-Off Ver
    2010 Suite
    Posts
    28

    Chemical Inventory: Making expired sheet from below

    I am trying to extract all expired chemicals from the Inventory Closet, Refrigerator tab, Hood 1 tab, Hood 2 tab, Hood 3 tab, and Hood 4 tab into the ExpiredChemicals tab starting at A5 by combining them. Same format and everything.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Chemical Inventory: Making expired sheet from below

    Maybe:

    Sub gdclyde()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        Select Case ws.Name
            Case Is = "Inventory Closet", "Refrigerator", "Hood 1", "Hood 2", "Hood 3", "Hood 4"
                ws.UsedRange.Offset(5).Copy Sheets("ExpiredChemicals").Range("B" & Rows.Count).End(3)(2)
        End Select
    Next ws
    With Sheets("ExpiredChemicals")
        .Range("H5:H" & Range("H" & Rows.Count).End(3).row).AutoFilter 1, "<>EXPIRED"
        .Range("H6:H" & Range("H" & Rows.Count).End(3).row).SpecialCells(12).EntireRow.Delete
        .AutoFilterMode = False
    End With
    End Sub

  3. #3
    Registered User
    Join Date
    12-19-2014
    Location
    US
    MS-Off Ver
    2010 Suite
    Posts
    28

    Re: Chemical Inventory: Making expired sheet from below

    Is there a way where the list can have no spaces and it only lists the expired ones.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Chemical Inventory: Making expired sheet from below

    Not sure what you mean. When I run it there are only the ones indicated as "Expired" in Column H.

  5. #5
    Registered User
    Join Date
    12-19-2014
    Location
    US
    MS-Off Ver
    2010 Suite
    Posts
    28

    Re: Chemical Inventory: Making expired sheet from below

    I made some changes by inserting columns to count my expired chemicals on each tab. I also made a change on the macro for the expired chemicals tab by deleting all the spaces between each tab when it load,so that the list is continous without no spaces. When I press the newly modified macro it copies everything. It copies over the hidden columns. So I see alot of zeros on the bottom the worksheet. Is there a way it only copies the expired chemicals without revealing the hidden columns.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Chemical Inventory: Making expired sheet from below

    Can you provide the code that you are using?

  7. #7
    Registered User
    Join Date
    12-19-2014
    Location
    US
    MS-Off Ver
    2010 Suite
    Posts
    28

    Re: Chemical Inventory: Making expired sheet from below

    Chemical inventory.xlsx
    Sub expired()
    Dim ws As Worksheet
    For Each ws In ActiveWorkbook.Worksheets
        Select Case ws.Name
            Case Is = "Inventory Closet", "Refrigerator", "Hood 1", "Hood 2", "Hood 3", "Hood 4"
                ws.UsedRange.Offset(4).Copy Sheets("ExpiredChemicals").Range("B" & Rows.Count).End(3)(2)
        End Select
    Next ws
    With Sheets("ExpiredChemicals")
        .Range("H4:H" & Range("H" & Rows.Count).End(3).Row).AutoFilter 1, "<>EXPIRED"
        .Range("H6:H" & Range("H" & Rows.Count).End(3).Row).SpecialCells(12).EntireRow.Delete
        .AutoFilterMode = False
    End With
    
    End Sub
    Its the same code. When I run the code its missing some chemicals that are expired. Its not transferring them into the expired chemicals tab.

+ 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. [SOLVED] Need Help with making Inventory Sheet: Removing items and logging the date
    By petg in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-02-2015, 05:22 PM
  2. complicate chemical inventory drop down reference.
    By russader in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-19-2013, 02:48 PM
  3. complicate chemical inventory drop down reference.
    By russader in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-17-2013, 02:15 PM
  4. Chemical Inventory- Create unique number for each entry to label
    By wijoga in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-17-2013, 12:33 PM
  5. Replies: 4
    Last Post: 12-01-2012, 09:37 AM
  6. Compare expired dates to a required date and sum available inventory
    By emiliekatherine in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-19-2012, 02:02 PM
  7. Chemical Inventory
    By Jim123 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2010, 12:17 PM

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