Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi,
I have an Excel Workbook with 32 worksheets in it (31 days & summary). I have the following macro and would like to run it in some of the worksheets (e.g. from day1 to day4, day15 to day20 and so on) . Is there a way to do it at one go rather than to select the worksheet one by one? Maybe create an input box to enter the date range? I dont have much knowledge of VBA and would appreciate any help. Thank you. ' Macro2 Macro(cntl+shift+i) ' Columns("S:S").Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.CutCopyMode = False Range("S3").Value = "GSTRate" Columns("S:S").Select Selection.TextToColumns Destination:=Range("S1"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _ :=Array(1, 1) Selection.SpecialCells(xlCellTypeBlanks).Select Range("S2").Activate Selection.FormulaR1C1 = "=R[1]C" Cells.Select Selection.EntireColumn.Hidden = False Range("A4:M4").Select Selection.Copy Range("S1000").End(xlUp).Select ActiveCell.Offset(0, -18).Range("A1").Select Range(Selection, Selection.End(xlUp)).Select ActiveSheet.Paste Application.CutCopyMode = False End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How To Refresh Chart Data Without Calculating The Worksheet | Charts and Charting in Excel | |||
graphs from multiple worksheet : query | Charts and Charting in Excel | |||
How do link to a remote worksheet using the path value in a field? | Links and Linking in Excel | |||
Worksheet name and Backward compatibility | Excel Discussion (Misc queries) | |||
Macro for Show/Hide Column | Excel Discussion (Misc queries) |