Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

Excel Macro

Posted on 2011-09-29
Medium Priority
200 Views
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
``````
0
Question by:Svlss
[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

LVL 24

Expert Comment

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

LVL 19

Accepted Solution

Arno Koster earned 2000 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

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to usâ€¦
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

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

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