Macro to move certain columns to new sheet based on status (ie; "done")

AnnyCav

New Member
Joined
May 15, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello everyone, I have a spreadsheet with TWO sheets.
Sheet ONE (Current Tasks - Sheet will be renamed once sorted)
- This sheet contains all the tasks that I am working on.
Sheet TWO (Future Tasks - sheet will be renamed once sorted)
- This sheet holds all my future/upcoming tasks, there may be 30 of them which are listed by "Date Due"

What I am wanting to do (not so successfully)

I have a spreadsheet which I have already started on including code (you will laugh, but some of it works!), but I do not understand how to attach it, so please let me know how I can do this.
In my spreadsheet is want to:

STEP 1
  1. Use a command button [Get Today's Tasks] in Sheet ONE to pull tasks from sheet TWO where the Task Date is equal to TODAY'S DATE. (I want them to be cut and pasted, not copied).
  2. When the data comes into Sheet ONE, it will be pasted on the Next available line (as they may already be unfinished tasks in that list), It will only need to be a straight cut/paste only because
    1. I will already have each column formatted as required ie; Date format, Cycle column will be pre-formatted with data validation (in case I want to change the cycle at any time and to keep it correct)
    2. Status column same as cycle column for same reason.
STEP 2
  1. Use a command button [Move Tasks]which I have already done some coding on - the bit that will make you laugh, (and as you will see on the images provided - does not quite work - LOL!) to ...
    1. Move any tasks that have "DONE" in the status, back to Sheet TWO, however, this will be based on the following ...
      1. The new Task Date that will go over to sheet TWO will be the date in Column F (Next Due) of sheet 1 (this has been calculated using a formula based on the the cycle)
      2. The new List Date that will go over to sheet TWO will be the date in Column G (Next List) of sheet 1 (also calculated using a formula based on the cycle)
      3. The Task description will be copied and pasted into the Task Description of sheet TWO as normal.
      4. The Cycle information will also be copied/pasted back into The Cycle in Sheet TWO as normal
So, as you can see, the tasks will more often than not re-cyle over and over based on the cycle column.
 

Attachments

  • Current Tasks.JPG
    Current Tasks.JPG
    47.8 KB · Views: 8
  • Future Tasks.JPG
    Future Tasks.JPG
    50.2 KB · Views: 8
I am glad that I helped you Anny :)
Well, before I give you the answer try to do it yourself the way you described it by recording a macro. Developer tab - Record a macro copy the range and then paste it as values. Look at the code and voila :)
Hi, this is still beyond me. I have the code, I have changed cut to copy (as you cannot paste special after cutting), I have put the code in all over the place, but I cannot make this work and I am about to give up this whole idea away. I do not know why all the places I have put the paste.special code. Please can you help?
 
Upvote 0

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,217,390
Messages
6,136,319
Members
450,005
Latest member
BigPaws

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top