Sir,
I used indirect function. And it worked.
=COUNTIF(INDIRECT("C2"):INDIRECT("G7"),I2)
Also I got reply from one member bosco_yip. His solution also worked perfectly.
=COUNTIF(OFFSET($A$1,1,2,6,5),I2)
Now I am trying to keep table on sheet b and calculation on sheet a.
For that I am trying...