Skip to content

Instantly share code, notes, and snippets.

@DarqueWarrior
Last active March 11, 2024 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DarqueWarrior/58b33cd129d556e84ba10454fa2c2e0b to your computer and use it in GitHub Desktop.
Save DarqueWarrior/58b33cd129d556e84ba10454fa2c2e0b to your computer and use it in GitHub Desktop.
This Excel function will extract the expiration date in an Excel Date time serial number format from the Action column from a Fidelity CSV download file.
=IF([@[Option Trade]],
DATE(
LEFT(YEAR(NOW()),2)&MID([@Action],FIND("$",[@Action])-3,2),
MONTH(MID([@Action],FIND("$",[@Action])-10,3)&1),
MID([@Action],FIND("$",[@Action])-6,2)
),
"")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment