Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Excel Macro

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
Svlss
Asked:
Svlss
1 Solution
 
StephenJRCommented:
That macro is just concerned with fomatting and sorting data. What is a quant?
0
 
Arno KosterCommented:
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

Independent Software Vendors: 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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now