Formatting not applied until cell is edited

A

Argent

This is one that's bugged me for years. The latest example is: I have a
macro which pastes a column of numbers into my worksheet (target cells can be
general or number it makes no difference) . Programmatically, I apply
conditional formatting to the pasted cells. Most of the time this works but
sometimes, the conditional formatting does not display until I hit F2 on each
cell in turn once the macro has finished. This is not acceptable as this
macro is part of a large Office application and runs automatically. My users
won't take kindly to having to fiddle with the spreadsheet. I do not want to
change the values in my cells, just have Excel format them properly. Surely,
there's a way - other than copy-paste multiplied by 0 - to get this to work?
 
N

Niek Otten

Try the Application.CalculateFull method

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| This is one that's bugged me for years. The latest example is: I have a
| macro which pastes a column of numbers into my worksheet (target cells can be
| general or number it makes no difference) . Programmatically, I apply
| conditional formatting to the pasted cells. Most of the time this works but
| sometimes, the conditional formatting does not display until I hit F2 on each
| cell in turn once the macro has finished. This is not acceptable as this
| macro is part of a large Office application and runs automatically. My users
| won't take kindly to having to fiddle with the spreadsheet. I do not want to
| change the values in my cells, just have Excel format them properly. Surely,
| there's a way - other than copy-paste multiplied by 0 - to get this to work?
|
 
A

Argent

Thanks Nick. Sadly, the CalculateFull not the CalculateFullRebuild method
made any difference.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top