Sub Macro1ICICI()
'
' Macro1ICICI Macro
'
'
Dim ws As Worksheet
Set ws = Sheets.Add(After:=ActiveSheet)
With Sheets("Sheet1")
.Range("A5", .Range("A5").End(xlDown)).Copy Destination:=ws.Range("A4")
End With
ws.Columns("A:A").EntireColumn.AutoFit
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "ICICI"
Range("B5").Select
Sheets.Add After:=ActiveSheet
ActiveWorkbook.Queries.Add Name:="Table 0 (2)", Formula:= _
"let" & Chr(13) & "" & Chr(10) & " Source = Web.Page(Web.Contents(""https://www.icicibank.com/Personal-Banking/account-deposit/fixed-deposit/fd-interest-rates.page""))," & Chr(13) & "" & Chr(10) & " Data0 = Source{0}[Data]," & Chr(13) & "" & Chr(10) & " #""Changed Type"" = Table.TransformColumnTypes(Data0,{{""Maturity Period"", type text}, {""Interest rates (per cent per annum) w.e.f. Oct 21, 2020 Single deposit of less than ? 20.0 million " & _
"General"", type text}, {""Interest rates (per cent per annum) w.e.f. Oct 21, 2020 Single deposit of less than ? 20.0 million **Senior Citizen"", type text}, {""Interest rates (per cent per annum) w.e.f. February 17, 2021 Single deposit of ? 20.0 mn & above but less than 50.0 mn General"", type text}, {""Interest rates (per cent per annum) w.e.f. February 17, 2021 Si" & _
"ngle deposit of ? 20.0 mn & above but less than 50.0 mn **Senior Citizen"", type text}})" & Chr(13) & "" & Chr(10) & "in" & Chr(13) & "" & Chr(10) & " #""Changed Type"""
ActiveWorkbook.Worksheets.Add
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
"OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data Source=$Workbook$;Location=""Table 0 (2)"";Extended Properties=""""" _
, Destination:=Range("$A$1")).QueryTable
.CommandType = xlCmdSql
.CommandText = Array("SELECT * FROM [Table 0 (2)]")
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.PreserveColumnInfo = True
.ListObject.DisplayName = "Table_0__2"
.Refresh BackgroundQuery:=False
End With
Range("B10").Select
Application.CommandBars("Queries and Connections").Visible = False
Sheets("Sheet2").Select
ActiveCell.FormulaR1C1 = _
"=Table_0__2[@[Interest rates (per cent per annum) w.e.f. Oct 21, 2020 Single deposit of less than ? 20.0 million General]]"
Range("B6").Select
ActiveCell.FormulaR1C1 = _
"=Table_0__2[@[Interest rates (per cent per annum) w.e.f. Oct 21, 2020 Single deposit of less than ? 20.0 million General]]"
Range("B7").Select
ActiveCell.FormulaR1C1 = _
"=Table_0__2[@[Interest rates (per cent per annum) w.e.f. Oct 21, 2020 Single deposit of less than ? 20.0 million General]]"
Range("B8").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-1]C"
Range("B9").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-1]C"
Range("B10").Select
Range("B20").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-11]C"
Range("B21").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-11]C"
Range("B22").Select
ActiveWindow.SmallScroll Down:=13
Sheets("Sheet2").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-11]C"
Range("B23").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-12]C"
Range("B24").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-13]C"
Range("B25").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-13]C"
Range("B26").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-13]C"
Range("B27").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-14]C"
Range("B28").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-14]C"
Range("B29").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-14]C"
Range("B30").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-15]C"
Range("B31").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-16]C"
Range("B32").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-16]C"
Range("B33").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-17]C"
Range("B34").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-18]C"
Range("B35").Select
ActiveWindow.SmallScroll Down:=6
Range("B32").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R16C2"
Range("B32").Select
Selection.AutoFill Destination:=Range("B32:B37"), Type:=xlFillDefault
Range("B32:B37").Select
Range("B38").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-21]C"
Range("B39").Select
ActiveWindow.SmallScroll Down:=8
Sheets("Sheet4").Select
Range("B11").Select
ActiveWindow.SmallScroll Down:=5
Sheets("Sheet2").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-23]C"
Range("B40").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-24]C"
Range("B41").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-24]C"
Range("B42").Select
ActiveWindow.SmallScroll Down:=4
ActiveCell.FormulaR1C1 = "=Sheet4!R[-27]C"
Range("B43").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-27]C"
Range("B44").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-28]C"
Range("B45").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-29]C"
Range("B46").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-29]C"
Range("B46").Select
Sheets("Sheet4").Select
Range("B17").Select
Sheets("Sheet2").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R17C2"
Range("B46").Select
Selection.AutoFill Destination:=Range("B46:B51"), Type:=xlFillDefault
Range("B46:B51").Select
Range("B52").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-34]C"
Range("B53").Select
ActiveWindow.SmallScroll Down:=7
ActiveCell.FormulaR1C1 = "=Sheet4!R[-36]C"
Range("B54").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-36]C"
Range("B55").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-37]C"
Range("B56").Select
ActiveWindow.SmallScroll Down:=14
Range("B64").Select
ActiveWindow.SmallScroll Down:=8
Sheets("Sheet2").Select
Range("B78").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-57]C"
Range("B77").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-57]C"
Range("B76").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-56]C"
Range("B75").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-55]C"
Range("B74").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-54]C"
Range("B73").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-54]C"
Range("B72").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-53]C"
Range("B71").Select
Sheets("Sheet4").Select
Range("B19").Select
Sheets("Sheet2").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-52]C"
Range("B70").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-51]C"
Range("B69").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-51]C"
Range("B68").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-50]C"
Range("B67").Select
ActiveCell.FormulaR1C1 = "=Sheet4!R[-49]C"
Range("B66").Select
ActiveWindow.SmallScroll Down:=-7
ActiveCell.FormulaR1C1 = "=Sheet4!R[-48]C"
Range("B65").Select
End Sub