color coordinate web query data based on the number being + or -

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to color coordinate data which is being imported into excel
though a web query based on the number being either positive or negative.
Does anyone know if it is possible to write a macro which would do this.
Sometimes the numbers will be positive and therefore I want them to show up
in green and other times the numbers will be negative and I would want them
to show up in red.
 
Maybe you don't want a macro.

Try formatting the column where these numbers are:

Selecting all the column where the numbers are to go, Select Cells in the
Format menu and then select the Number tab. In the left hand list select
custom. Now go into the Type box and type yourself a custom number format:
If General is in the box (General format) for example, before General type
[green]. After General type ;[red]-General. Now select OK and you will find
positive numbers green and negative numbers red with a preceding minus sign.

If you don't know about custom formats, the codes before ; refer to positive
and those after ; refer to negative

All the best
Philip
 
Back
Top