Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-08-2017, 04:27 AM
meowmeow meowmeow is offline Advice on macro that moves rows across sheets Windows 7 64bit Advice on macro that moves rows across sheets Office 2013
Novice
Advice on macro that moves rows across sheets
 
Join Date: Nov 2017
Posts: 7
meowmeow is on a distinguished road
Default Advice on macro that moves rows across sheets

Hi all, recently I've been working on a new project that uses a macro to move rows of information across sheets, from sheets we call Triage to Open Tasks to Closed Tasks.



We do this to stimulate a work flow and actively management what tasks are being done etc.

I've ran into a bit of a problem,
Triage is a table, Open Tasks is a table and Closed tasks is range.

The issue is inbetween Triage and Open tasks, when I use the macro to move a row of information from triage to Open, it adds to the worksheet as part of a range and doesn't go into the table that I have in the Open tasks - this is a problem because when we go to Open tasks and start filtering information, it only filters the table stuff and not the range stuff, we really need the information to move into the table so it is considered in the filtering, we considered converting the table to a range, however, that defeats our automatic formulas that we get with having the information in a table.

Is there a way to assign the macro to move information into a table as opposed to the worksheet?

Any help is appreciated, thanks in advance.

The macro I use to move information is this:

Private Sub Worksheet_Change(ByVal Target As Range)

Dim nxtRow As Long

' Limit to a single cell change in columns 21
If Target.Count > 1 Then Exit Sub
If Target.Column < 21 Or Target.Column > 22 Then Exit Sub

' If column 21
If Target.Column = 21 And UCase(Target.Value) = "YES" Then
nxtRow = Sheets("Open tasks").Range("U" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Copy _
Destination:=Sheets("Open tasks").Range("A" & nxtRow)
Application.EnableEvents = False
Target.EntireRow.Delete
Application.EnableEvents = True
Exit Sub
End If
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Advice on macro that moves rows across sheets search multiple sheets and create list from found rows trevorc Excel Programming 1 01-05-2017 06:24 PM
Advice on macro that moves rows across sheets One macro to sort individual sheets in a workbook darbybrown Excel Programming 1 09-11-2016 12:51 PM
Advice on macro that moves rows across sheets Moves multiple rows from Sheet1 to Sheet2 khawajaanwar Excel Programming 2 09-09-2016 11:21 AM
A macro that moves the current paragraph up or down? New Daddy Word VBA 2 04-13-2014 02:25 PM
Advice on macro that moves rows across sheets creating macro for biffurcation in sheets according to data. Nirik Excel Programming 8 05-07-2011 05:11 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft