Code to delete rows across 12 worksheets

madforgolf

Board Regular
Joined
Oct 20, 2006
Messages
182
Office Version
  1. 365
  2. 2016
Title should read to delete data from rows, not delete rows

Hi Guys,

I have a holiday sheet with a summary page.
Im looking for the best way other than manually going through each worksheet to delete data in the rows if a person is removed from the summary sheet.

The names are in the summary A3:A49. not all names may reach A49 due to which group is using a copy.
The months are in the other 12 worksheets, starting from April to March'13.
The data for hols are in range B3:AF49 (Days in the month) in all months sheets.

Is there a way for a macro to check that if a name is removed (say from A16 in the summary sheet, that then checks all rows with names, and then deletes the data from range B16:AF16 on all other worksheets (except the summary sheet as the forumlas are on this page.) because the summary sheet A16 is blank? This can apply to all names in Column A in summary sheet.
I dont want excel to move cells up if blanks are found.At present i delete the data from the rows effected manually if a person leaves the group even if there are spaces spare for others to be added.

Hopefully i have not confused anyone to much.

Cheers

Marty
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Any chance you could show some samples of the sheets (any sensitive information scrubbed naturally).

Thanks
Adam
 
Upvote 0
Excel Workbook
ABCDEFGHIJKLMNOP
2STAFF NAMEAPRMAYJUNJULAUGSEPTOCTNOVDECJANFEBMARENTITLEDBOOKEDREM
3STACEY REID03000000000020317
4HELENA DOHERTY00115000000020713
5ISOBEL McARTHUR00025000000020713
6CHRISTINE HOLMES00000000000020020
7SHARON MARTIN20030400000020911
8STACEY RITCHIE00040000000020416
Holiday Entitled
Excel Workbook
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAF
1April-20121st2nd3rd4th5th6th7th8th9th10th11th12th13th14th15th16th17th18th19th20th21st22nd23rd24th25th26th27th28th29th30th
2NAMEYYYYYYYYYYYYYN/AN/AYYYYYN/AN/AYYYYYYYY
3STACEY REID
4HELENA DOHERTY
5ISOBEL McARTHUR
6CHRISTINE HOLMES
7SHARON MARTINHOLHOL
8STACEY RITCHIE
April
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,421
Members
448,961
Latest member
nzskater

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