How to do this in EXCEL/VBA

rajeabc

Well-Known Member
#1
I want to create few worksheets within a workbook.
Taking the names from a column in main sheet and creating sheets and renaming them. Please have a look on snap below for better clarity on what I need.
Please help .
Thanks a lot.
 
Last edited:
#2
I want to create few worksheets within a workbook.
Taking the names from a column in main sheet and creating sheets and renaming them. Please have a look on snap below for better clarity on what I need.
Please help .
Thanks a lot.
use this mecro

Sub Macro1()
Dim j As Integer
Dim sn As String
j = 2
Do Until IsEmpty(Sheets("SHEETNAME").Cells(j, 1))
sn = Sheets("SHEETNAME").Cells(j, 1).Value
Application.DisplayAlerts = False
On Error Resume Next
Sheets(sn).Delete
Sheets.Add.Name = sn
j = j + 1
Application.DisplayAlerts = True
Loop
Sheets("SHEETNAME").Select
End Sub
 

stock72

Well-Known Member
#4
I want to create few worksheets within a workbook.
Taking the names from a column in main sheet and creating sheets and renaming them. Please have a look on snap below for better clarity on what I need.
Please help .
Thanks a lot.
rajeabc ,

I dont know VBA ETC. But to some extend i am ok in handling excel ( infact running my project management with that only ) ..so if needed u can disclose what exactly u want as an output from which data... i will process in my own way and get for you if possible ....
 

rajeabc

Well-Known Member
#5
rajeabc ,

I dont know VBA ETC. But to some extend i am ok in handling excel ( infact running my project management with that only ) ..so if needed u can disclose what exactly u want as an output from which data... i will process in my own way and get for you if possible ....
was trying to fetch Swiss bank a/cs details :)

I wanted very simple thing..Was just trying to fetch future data from NSE website.. check below what I wanted to do... I want date(in qurl) to be taken from cells(here I am just changing expry date)... date is in cell(3,2)

Thanks
DIM m , y , d as integer
s = Cells(3, 2)----------------date in 24-02-2011

m = UCase(Format(s, "MM"))
y = Format(s, "YYYY")
d = Format(s, "dd")

I want expiryDate to go as 24-02-2011 in below qurl

qurl = "http://www.nseindia.com/marketinfo/sym_map/symbolMapping.jsp?instrumentType=FUTSTK&symbol=" & stock_code & "&expiryDate= " & y & "/" & m & "/cm" & d & m & y & " &optionType=select&strikePrice=&dateRange=day &fromDate=14-02-2011&toDate=18-02-2011&segmentLink=9&symbolCount=1"
 
Last edited:
#7
was trying to fetch Swiss bank a/cs details :)

I wanted very simple thing..Was just trying to fetch future data from NSE website.. check below what I wanted to do... I want date(in qurl) to be taken from cells(here I am just changing expry date)... date is in cell(3,2)

Thanks
DIM m , y , d as integer
s = Cells(3, 2)----------------date in 24-02-2011

m = UCase(Format(s, "MM"))
y = Format(s, "YYYY")
d = Format(s, "dd")

I want expiryDate to go as 24-02-2011 in below qurl

qurl = "http://www.nseindia.com/marketinfo/sym_map/symbolMapping.jsp?instrumentType=FUTSTK&symbol=" & stock_code & "&expiryDate= " & y & "/" & m & "/cm" & d & m & y & " &optionType=select&strikePrice=&dateRange=day &fromDate=14-02-2011&toDate=18-02-2011&segmentLink=9&symbolCount=1"
Downloading and analysing data using excel is fine but storing data is not practical.
Excel file becomes heavy. From some kb to some mb. Heavy file is useless.
Store data files in .csv format in a folder. And use that in your main program file.
 
#8
was trying to fetch Swiss bank a/cs details :)

I wanted very simple thing..Was just trying to fetch future data from NSE website.. check below what I wanted to do... I want date(in qurl) to be taken from cells(here I am just changing expry date)... date is in cell(3,2)

Thanks
DIM m , y , d as integer
s = Cells(3, 2)----------------date in 24-02-2011

m = UCase(Format(s, "MM"))
y = Format(s, "YYYY")
d = Format(s, "dd")

I want expiryDate to go as 24-02-2011 in below qurl

qurl = "http://www.nseindia.com/marketinfo/sym_map/symbolMapping.jsp?instrumentType=FUTSTK&symbol=" & stock_code & "&expiryDate= " & y & "/" & m & "/cm" & d & m & y & " &optionType=select&strikePrice=&dateRange=day &fromDate=14-02-2011&toDate=18-02-2011&segmentLink=9&symbolCount=1"
Can you share a working VBA code for downloading history-data information of any stock or of the full universe of stocks?