Hi, thank you for contacting JustAnswer.com. My name is***** will do my best to provide the right answer to your question.
The formatting of a cell cannot be 'kept', unless one applies either fixed formatting or conditional formatting to the 'destination' cell, that is the same formatting or conditional formatting as the original cell.
At least, not in a formula.
A VB or VBA programmed function could set the formatting of a 'destination' cell to be the same as that of an original cell, yes.
At least, that's my opinion.
Would any of the means I mentioned be OK for the usage you need instructions on?
Do you mean, a macro that will set the formatting on the cell where the formula is ?
Would the formatting of the cell vary according to the result of the formula, or the value in the cell produced by the formula, or anything like that?
OK, I admit that I don't know how to make a macro work to produce a conditional result.
And I'm not skilled enough at VB / VBA scripting to write such a script for you.
So I judge it best to Opt Out, having elicited some of the details of what you need. This opens the case to other Experts.
Welcome to Justanswer
I am Suryanto and I can write the macro for you
Can you send me a copy of your file (please remove sensitive data)You can attach the sample file using the paper clip icon in the reply box.