Share via

How do keep cell formatting when refreshing a query?

Anonymous
2015-04-08T15:27:36+00:00

Split from this thread.

Hi Jim,

Ok, I was able to make a web query from Yahoo which downloads the stock quotes.

The quotes are attached to the stock symbol, I wrote some code that separates them

but I have another problem. The problem is that some quotes are ok, let's say for AT&T (t)

I get the right quote which is 33.10, but some others have one decimal point too many;

like for Coca Cola (ko) I get 403.862 instead of 40.38.

So, I can not use these quotes the way they are downloaded.

Will appreciate any suggestion.  Thank you.

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Jim G 134K Reputation points MVP Volunteer Moderator
2015-04-08T16:21:47+00:00

Unfortunately, Phillip's answer doesn't address your question.

What you need is a macro.

Turn the VB Macro record on

Format the column or cells the way you want them.

From the Data menu choose Refresh Data

Turn the VB Macro recorder off

Save your macro and run it whenever you want to refresh the data.

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2015-04-08T15:51:52+00:00

    see if this screen shot will help Calculation Preference Excel 2011:

    _________

    Disclaimer:

    The questions, discussions, opinions, replies & answers I create, are solely mine and mine alone, and do not reflect upon my position as a Community Moderator.

    Was this answer helpful?

    0 comments No comments