Hi all..
Is it possible to loop this code for processing other symbols after BANKNIFTY
The other symbols are
CNX 100
CNX INFRA
CNX IT
CNX MIDCAP
CNX NIFTY JUNIOR
CNX REALTY
NIFTY MIDCAP 50
S&P CNX 500
S&P CNX DEFTY
S&P CNX NIFTY
CNX ENERGY
CNX FMCG
CNX MNC
CNX PHARMA
CNX PSE
CNX PSU BANK
CNX SERVICE
CNX SMALLCAP
I want to put these symbols in Column A and loop the above code and save the output in a single text file..
Kindly suggest any improvement..
Code:
Application.ScreenUpdating = False
Application.Calculation = xlManual
ChDir "E:\Macros\Input\NSE Indices"
Workbooks.Open Filename:="E:\Macros\Input\NSE Indices\BANK NIFTY" & Format(Workbooks("NSE Converter.xls").Sheets("Sheet1").Range("G2").Value, "dd-mm-yyyy") & "-" & Format(Workbooks("NSE Converter.xls").Sheets("Sheet1").Range("G2").Value, "dd-mm-yyyy") & ".csv"
Columns("A:A").Insert Shift:=xlToRight
Range("A2").FormulaR1C1 = "BANK NIFTY"
Rows("1:1").Delete Shift:=xlUp
Columns("H:H").Delete Shift:=xlToLeft
Columns("B:B").NumberFormat = "yyyymmdd"
Range("C1:F1").NumberFormat = "0.00"
ChDir "E:\Macros\Output"
ActiveWorkbook.SaveAs Filename:="E:\Macros\Output\BANK NIFTY" & Format(Workbooks("NSE Converter.xls").Sheets("Sheet1").Range("G2").Value, "ddmmyyyy") & ".txt", _
FileFormat:=xlCSV, CreateBackup:=False
Application.DisplayAlerts = False
Application.Calculation = xlAutomatic
Application.ScreenUpdating = True
ActiveWindow.Close
Is it possible to loop this code for processing other symbols after BANKNIFTY
The other symbols are
CNX 100
CNX INFRA
CNX IT
CNX MIDCAP
CNX NIFTY JUNIOR
CNX REALTY
NIFTY MIDCAP 50
S&P CNX 500
S&P CNX DEFTY
S&P CNX NIFTY
CNX ENERGY
CNX FMCG
CNX MNC
CNX PHARMA
CNX PSE
CNX PSU BANK
CNX SERVICE
CNX SMALLCAP
I want to put these symbols in Column A and loop the above code and save the output in a single text file..
Kindly suggest any improvement..