I think we need to format all symbols ending with PE or CE as JUL5100CE or PE by removing first few characters.
That will not work. TATAMOTORS12JUL140CE will become 12JUL140CE. We cannot remove Scrip Name. Use the following fields instead in that order from column A to G
Symbol | Last Trade Time | Last Traded Price | Volume Traded Today | Open Interest | Option Type | Strike Price
Change this iine
CellValue = Cells(r, C).Value & ",I," & Format$(Date, "yyyymmdd") ' ' nge this (Insert comma and I after ticker name)
as below-
CellValue = Cells(r, C).Value & left(Cells(r, 6).Value, 1) & Cells(r, 7).Value & ",I," & Format$(Date, "yyyymmdd") ' ' (Insert first letter of Option Type, Strike Price, comma and I and Date after ticker name)
Change this line
C = 1
to
For C = 1 to 5
Change this line
C= C+1
to
Next C