Solved

Formatting Future

Posted on 2015-02-02
12
98 Views
Last Modified: 2015-02-03
Hi Expert,

I have one WB which download file from Web and format, I need little modification in formatting.
Current Code Perform this steps
 Delete all files from this location "D:\AmiBroker Data\NSE\F&O"
 1 Download Zip From Start date to End Date
 2 Unzip that files.
 3 Find text "NIFTY" in column B which is mostly 3 match found in column B
 4 Register that three dates in column C which match to "NIFTY" and gave name instead of date as "I" "II" & "III"
 5 Apply above to all in column C as per date i.e. "I" "II" "III".
 6 Delete other rows which is not same as earlier match i.e. step 3 and step 4.
 7 Apply formula in cell P2
=IF(OR(A2="FUTSTK",A2="FUTIDX"),B2&" "&C2&","&TEXT(O2,"DD-MMM-YY")&","&F2&","&G2&","&H2&","&I2&","&K2&","&M2,IF(OR(A2="OPTIDX",A2="OPTSTK"),B2&" "&C2&" "&D2&" "&E2&","&TEXT(O2,"DD-MMM-YY")&","&F2&","&G2&","&H2&","&I2&","&K2&","&M2,""))
& formula drop down till end.
 8 copy whole column P and past to new .txt file and delete original .csv file
 9 next file till end.

Modification which I looking to
 Need  .text file from .csv file.
 After step 7
 1 Sort A to Z Column E
 2 Copy column P data only where in column E cell value = "xx" with header
 3 past these data to new .txt file and name as "F" & actual .csv file name.
 4 save to this location "D:\AmiBroker Data\NSE\F&O\Future"
 5 Next .csv file.

Note as new buttons created named Future it delete all files from this location "D:\AmiBroker Data\NSE\F&O\Future"
and follow the steps.

Thanks
Incoporated-Download-File-V14.xlsm
0
Comment
Question by:Naresh Patel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 
LVL 30

Expert Comment

by:gowflow
ID: 40583996
ok one by one

You mention: 1 Download Zip From Start date to End Date

What is the http address and format of the file ? same as FO ?
gowflow
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 40584004
Yes Sir, same as FO.

Thanks
0
 
LVL 30

Expert Comment

by:gowflow
ID: 40584129
OK just got an error in the formatting as in FO we were filtering by
"NIFTY" and "XX"

here no mention of XX at the csv level should we only do "NIFTY" ??? and after take XX only for future ???

gowflow
0
Office 365 Advanced Training for Admins

Special Offer:  Buy 1 course, get 2nd free!  Buy the 'Managing Office 365 Identities & Requirements' course w/ Accelerated TestPrep, and automatically receive the 'Enabling Office 365 Services' course FREE!

 
LVL 30

Expert Comment

by:gowflow
ID: 40584223
ok forget my last post I noticed that the workbook I posted had some wrong denomination like instead of
Future  --- > it is showing   Furture

so this is a major problem that I fixed in this version reason why I am attaching the whole workbook.

Pls try Future
and
Future & Options

as they are now using the same subs with different variables and chk if all is ok.

gowflow
Incoporated-Download-File-V16.xlsm
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 40584389
Both buttons worked fine. Only thing is Future button wont past date of last available file plus one day.

Thanks
0
 
LVL 30

Expert Comment

by:gowflow
ID: 40584523
Ooops !!! small typo

in module aStartFO Sub DownloadedFileFO

go toward the end just when you see

...
    Select Case sType

....

Replace
Case Future

BY
Case "Future"


this is it.
gowflow
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 40584568
Did What You Said But Still Not Resolved.Thanks
0
 
LVL 30

Accepted Solution

by:
gowflow earned 500 total points
ID: 40584761
I don't know what you did but here is the file.
gowlfow
Incoporated-Download-File-V16.xlsm
0
 
LVL 8

Author Closing Comment

by:Naresh Patel
ID: 40584807
Perfect - May I Ask Follow Up?
0
 
LVL 30

Expert Comment

by:gowflow
ID: 40585718
Yes sorry for  delay ... time zone difference !
gowflow
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 40586737
May I now?
0
 
LVL 8

Author Comment

by:Naresh Patel
ID: 40586863
here it is.

I had posted because I know only you can understand what mi up to...and you are creator of this WB. Other may got confused so may not attend.

Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

My experience with Windows 10 over a one year period and suggestions for smooth operation
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question