• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Moving data 'On Click'

robst

New Member
Hoping someone can help,


What I am trying to accomplish is this...


To have 3 worksheets (tabs) in one workbook (reflecting different project stages)


One worksheet tab named "Project Pending," another "Project Current", and another "Project Completed".


In each tab will be a simple list of projects. With a tick box to right of each listed Project.


What I would like is to be able to click a particular project tick box (say in Projects Pending), and have that data disappear from the list in "Projects Pending" tab and appear in "Projects Current" tab.


Is this possible??


If so please point me in the right direction...


Thanks,


Rob T

robtowner.com
 
I guess you need to start with a linked cell for the check box. set condition where if there is one check in one tab the other two box would be "unchecked".


so linked-cell#2 formula =if(linkedcell-checkbox1=true,false,true)


note that now the driver is click cell#1. You don't want to click on click cell#2 or else it will remove the formula you have put in place.
 
If instead of using actual check boxes (which would get tricky as you'd have to create an individual one for each row), if you just decide to use a specific column as your checkbox, you could use this event macro so that when you double click on that column (say, col S), the row is transferred. To install macro, right click on Projects Pending tab, view code, paste this in.

[pre]
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim CheckRange As Range
Dim OutputSheet As String
Dim DestRow As Integer

'Define the range we'll use as the "checkbox"
Set CheckRange = Range("S:S")
'Name of destination sheet
OutputSheet = "Projects Current"

'If user didn't activate our special range, do nothing
If Intersect(Target, CheckRange) Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Application.EnableEvents = False
'Where do we need to paste the new data?
DestRow = Worksheets(OutputSheet).Range("a65536").End(xlUp).Row + 1

'Transfer the data
Target.EntireRow.Cut
Worksheets(OutputSheet).Select
ActiveSheet.Cells(DestRow, "A").EntireRow.Select
ActiveSheet.Paste
Me.Select
Target.Select

'Cleanup
Application.CutCopyMode = False
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
[/pre]
 
Can you email me an example spreadsheet?

robert.s.towner@gmail.com


Would owe you millions! but can only pay in stories...

extremelyshortstories.com
 
Back
Top