Hi Vishwa, Please try this i hope this will do your work Public Sub DeleteWeekends() Dim rng As Range Dim rngData As Range With ThisWorkbook.Worksheets("Sheet1") Set rngData = .Range("A1:A" & .Range("A" & .Rows.Count).End(xlUp).Row) For Each rng In rngData If Application.WorksheetFunction.Text(rng.Value, "DDD") = "Sat" Or Application.WorksheetFunction.Text(rng.Value, "DDD") = "Sun" Then rng.Value = "" End If Next End With rngData.SpecialCells(xlCellTypeBlanks).EntireRow.Hidden = True End Sub Regards Prince Dubey
On Wednesday, 27 June 2012 00:46:00 UTC+5:30, Viswanathan Yoganathan wrote: > Hi all, > > > > In the attached excel, I want to delete the week ends whereas at the same > time the position of the month should not move. It means the Feb month > should start from A34, March month should start from A64. Please advise > using VBA macro. > > > > Thanks, > > Vishwa > > "CONFIDENTIALITY NOTICE: This message and any attachment are confidential > and may also be privileged. If you are not the intended recipient of this > e-mail you may not copy, forward, disclose or otherwise use it or any part > of it in any form whatsoever. If you are not the intended recipient please > telephone or e-mail the sender and delete this message and any attachment > from your system." > -- -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com To unsubscribe, send a blank email to excel-macros+unsubscr...@googlegroups.com