Solved

Excel Macro

Posted on 2011-09-29
2
192 Views
Last Modified: 2012-05-12
A part of my macro tells about the expiration of a quant. Can any one tell me by looking at the below code in how many days a quant is kept after expiration
Sub ExpiredQuantDate()

'
    Application.Goto Reference:="QDate"
    Selection.NumberFormat = "yyyy/mm/dd"
    ActiveWindow.SmallScroll Down:=-4
    Range("B6:O6").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.sort Key1:=Range("F6"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Selection.sort Key1:=Range("F6"), Order1:=xlDescending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
    Application.Goto Reference:="QDate"
    Selection.NumberFormat = "m/d/yyyy"
    ActiveWindow.SmallScroll Down:=-4
    Range("D1:L1").Select
End Sub

Open in new window

0
Comment
Question by:Svlss
2 Comments
 
LVL 24

Expert Comment

by:StephenJR
ID: 36814859
That macro is just concerned with fomatting and sorting data. What is a quant?
0
 
LVL 19

Accepted Solution

by:
akoster earned 500 total points
ID: 36814885
No, this is not possible from the code alone.

The code selects the QDate cell or range, scrolls up 4 cells, sorts all used cells in the columns B up to O (starting from row 6 downwards), and finally selects the range D1 up to L1. In the code no reference to quants or expiry dates whatsoever exist.

Looking at the code, i suspect either other code fragments or conditional formatting / hiding rows is used to expire a quant but in order to verify this, you need to upload the worksheet this code resides in.

0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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 article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

759 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now