I am creating a report from Cognos which is generating the result below in Excel format:
The problem with the code is everything I have hardcoded the values based on line numbers and which I want to make dynamic, so that if I have to generate a report for the previous 2 weeks, then I won't have to change my macro code every time.
Currently I am showing the value for name = "PO" and id = 28. But there will be other name and id also. For every name and id there will be 4 column values as for RR, DD, EE and FF. I have to group them based on name and id and create new sheet which will have results like below:
 
    