Thanks Domski...as Dulanic said.i never thought that we can build excel formulas like this also.....

Hats off.....