Help with macro please

Beekman

Board Regular
Joined
Nov 7, 2008
Messages
64
I have sheets named Monday thru to Friday
In Col A from A10 Have a list of numbers.(4 digits)
Some numbers end with a M,U,W,T,F

Want to delete rows with any numbers ending with U,W,T,F In Monday,

M,W,T,F in Tuesday, M,U,T,F in Wednesday, M,U,W,F in Thursday,

M,U,W,T in Friday and move rest of rows up

Is there a macro I can use for all days at once or would it be better a seperate one for each day?

Thanks, in advance, Ben
 
Thanks to all for your help . Tried again with A.D. Taylor's version and everthing works fine.

Just as a extra querie is it possible to modify to delete duplicated number related to number with text, for example with Monday in the list of numbers with letter ''M' numbers without ""M" exist above it eg


4100
4101
4102
4102M
4103
4103W
4104
4125
4125M
4126
4157F
etc

As in 'Taylor's' and 'Weaver's' macro it deletes all other letters except M
but where 4102M stays I would like also to delete 4102 and 4125 and any corresponding number the same as ending with 'M'. Hope you understand what I'm trying to achieve. Happy with the way macro works, so i could just delete these rows manually if no solution
 
Upvote 0

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Thanks to all for your help . Tried again with A.D. Taylor's version and everthing works fine.

Just as a extra querie is it possible to modify to delete duplicated number related to number with text, for example with Monday in the list of numbers with letter ''M' numbers without ""M" exist above it eg


4100
4101
4102
4102M
4103
4103W
4104
4125
4125M
4126
4157F
etc

As in 'Taylor's' and 'Weaver's' macro it deletes all other letters except M
but where 4102M stays I would like also to delete 4102 and 4125 and any corresponding number the same as ending with 'M'. Hope you understand what I'm trying to achieve. Happy with the way macro works, so i could just delete these rows manually if no solution

AD_Taylor - thanks for the tweak - although the version as posted did work on my dataset, probably because I was testing on one sheet only. You're right about the xlup not being necessary, I still use xltoright when deleting columns too!

Beekman - what you're suggesting is possible but I'm thinking would require a fair amount of tweaking. I can take a look at it later if nobody else has come up with a solution.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,834
Members
452,947
Latest member
Gerry_F

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