Preserving formatting for charts

I am creating a chart by clearing the series and categories, with this the cell formatting is also lost.

Is there a way to preserve the formatting for the newly inserted data for the cell values?

@siddhanntarora,

I have observed your comments. Can you please share your sample so that we may investigate in detail to help you out.