# Power query keep formatting after refresh



## CuriousGeorge67 (Oct 22, 2018)

I'm using PQ to get data from an external source.

I'd like to change formatting for those records that are retrieved, but the formatting seems to disappear if I refresh.

What are the recommended methods to keep the formatting during a refresh.

BTW, I do have the checkbox checked that says "preserve cell formatting" and "preserve column sort/filter/layout".

The formatting seems to "move" when new records arrive.


----------



## Craigc3814 (Oct 23, 2018)

Your formatting needs to be done within PQ, not within Excel if that makes sense.

If you want a number to appear as a decimal number to appear as a whole number that needs to be a rule within PQ by changing the data type.

You did not really give an example so I am not sure if that answers your question


----------



## CuriousGeorge67 (Oct 23, 2018)

Thanks.

I should have said formatting like, changing a cell with color while I'm working with it.

So for example, I have several rows that I would like to format with the fill color green.　
But after I do that and hit refresh, that coloring seems to "move" to other rows....so it looks like the formatting becomes specific to the row it was applied to.

　
This PQ becomes a working document...but maybe PQ doesn't really work that way.

Just looking for a way to work with it so this sort of thing doesn't happen.


In the end, the query creates a worklist that I'm then formatting with green as I get items done.


Thanks!


----------



## Craigc3814 (Oct 23, 2018)

It sounds like your issue is not PQ then. It sounds like you need to write an if formula for conditional formatting within excel


----------

