Results 1 to 5 of 5

Automated excel functions

Threaded View

prabhu04 Automated excel functions 09-25-2018, 06:29 AM
WideBoyDixon Re: Automated excel functions 09-25-2018, 06:49 AM
prabhu04 Re: Automated excel functions 09-25-2018, 07:06 AM
WideBoyDixon Re: Automated excel functions 09-25-2018, 07:21 AM
prabhu04 Re: Automated excel functions 09-25-2018, 08:26 AM
  1. #4
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: Automated excel functions

    Strange because VBA is much more restrictive (doesn't work online or on mobile). However, right click the sheet with the data, select "View Code" and paste the following:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
    Dim lastRow As Long
    
    ' Only do this if column D is changed
    If Application.Intersect(Target, Range("D:D")) Is Nothing Then Exit Sub
    
    ' Turn off screen updating
    Application.ScreenUpdating = False
    
    ' Find the last row of data
    lastRow = Cells(Rows.Count, "A").End(xlUp).Row
    
    ' Filter the rows for "wip"
    Range(Range("A1"), Cells(lastRow, "G")).AutoFilter Field:=4, Criteria1:="wip"
    
    ' Clear the contents of the second sheet
    Sheets("Sheet2").Cells.ClearContents
    
    ' Copy visible cells to the second sheet
    Range(Range("A1"), Cells(lastRow, "B")).SpecialCells(xlCellTypeVisible).Copy Destination:=Sheets("Sheet2").Range("A1")
    
    ' Remove the filter
    Range(Range("A1"), Cells(lastRow, "G")).AutoFilter
    
    ' Turn on screen updating
    Application.ScreenUpdating = True
    
    End Sub
    Also attached.

    WBD
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA/Excel automated invoicing
    By here4help in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2014, 02:35 PM
  2. Shift Turnover Automated functions
    By kranco in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-22-2013, 03:08 AM
  3. Automated Min Max functions on multiple criteria
    By apetlu in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-04-2012, 02:57 PM
  4. Replies: 1
    Last Post: 02-10-2012, 05:27 PM
  5. How to do automated Search & Assign functions
    By syam74 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-23-2009, 11:42 PM
  6. automated row erasing in excel
    By buhnen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-13-2008, 03:35 AM
  7. Automated formatting from basic Excel to fancy Excel!
    By jimbo2112 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-25-2007, 02:21 PM
  8. [SOLVED] 3 questions about automated c++ com add-in worksheet functions
    By gert in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-10-2005, 06:06 AM

Tags for this Thread

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