VBA Code Help Add/Delete Columns Based on Criteria in Different Worksheet

Mayred

New Member
Joined
Oct 27, 2017
Messages
1
Hello,

I am still learning VBA but I have been asked to create a macro for a timesheet for my boss. It is a timesheet where each employee has time recorded weekly and separated by projects. The weekly start date is in Row 1 as a merged cell and the employee's names are in Row 2 followed by all the time below them. It starts at Column S.

In a separate worksheet I have created a small table with Add, Delete, and Date with a hierarchy table below to denote the order they should be in. Also there is a sample row for copying reasons.

What I need to do is create two macros, one to add and one to delete. The one to delete will take the name in Sheet2 and find the name in Row 2 in Sheet1 and delete the columns if they are greater than the date. The second one needs to take the copied cell and, using the hierarchy table as a guide, insert it into columns after the date.

I have been trying it for a while and I have found nothing on the internet that can help with this.
Thanks greatly in advance.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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