ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   color coordinate web query data based on the number being + or - (https://www.excelbanter.com/excel-discussion-misc-queries/70664-color-coordinate-web-query-data-based-number-being.html)

Ukemann

color coordinate web query data based on the number being + or -
 
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.

Philip Reece-Heal

color coordinate web query data based on the number being + or -
 
Maybe you don't want a macro.

Try formatting the column where these numbers a

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


"Ukemann" wrote in message
...
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.





All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com