ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Creating strings for legend (https://www.excelbanter.com/excel-discussion-misc-queries/185210-creating-strings-legend.html)

[email protected]

Creating strings for legend
 

Several spreadsheet have a row of angles from 0 to 360° step 5° and it
would be great to create a row above that which has a character string
for use in the legend box. This new row would have the angle (0-360)
with " deg" concatenated. What is the expression for this row?

Example:

0 deg 5 deg 10 deg 15 deg

0, 5, 10, 15,

The expression must also work for angles from -180 to +180

-G


Pete_UK

Creating strings for legend
 
Assume you want this on row 1 with your degrees starting in A2, put
this in A1:

=TEXT(A2,"0 deg")

Copy this across the row as required.

Hope this helps.

Pete

On Apr 26, 1:47*am, wrote:
Several spreadsheet have a row of angles from 0 to 360° step 5° and it
would be great to create a row above that which has a character string
for use in the legend box. This new row would have the angle (0-360)
with " deg" concatenated. What is the expression for this row?

Example:

0 deg *5 deg 10 deg 15 deg

0, 5, 10, 15,

The expression must also work for angles from -180 to +180

* *-G



[email protected]

Creating strings for legend
 
On Fri, 25 Apr 2008 17:51:26 -0700 (PDT), Pete_UK
brought the following to our attention:

Assume you want this on row 1 with your degrees starting in A2, put
this in A1:

=TEXT(A2,"0 deg")

Copy this across the row as required.

Hope this helps.

Pete


Thanks.. that expression is returning a #VALUE!

I'll also look in the Help section. Basically I'd like to pick up the
angle value and stick " deg" to it and make that cell a text string.

-G


On Apr 26, 1:47*am, wrote:
Several spreadsheet have a row of angles from 0 to 360° step 5° and it
would be great to create a row above that which has a character string
for use in the legend box. This new row would have the angle (0-360)
with " deg" concatenated. What is the expression for this row?

Example:

0 deg *5 deg 10 deg 15 deg

0, 5, 10, 15,

The expression must also work for angles from -180 to +180

* *-G



[email protected]

Creating strings for legend
 
On Fri, 25 Apr 2008 17:51:26 -0700 (PDT), Pete_UK
brought the following to our attention:

Assume you want this on row 1 with your degrees starting in A2, put
this in A1:

=TEXT(A2,"0 deg")

Copy this across the row as required.

Hope this helps.

Pete


Got it now.. the correct expression is:

=CONCATENATE(TEXT(A2,"0"), " deg")

or

=CONCATENATE(TEXT(A2,"0"), " °")


where the ASCII code for the ° symbol is: Alt+0176


-G

On Apr 26, 1:47*am, wrote:
Several spreadsheet have a row of angles from 0 to 360° step 5° and it
would be great to create a row above that which has a character string
for use in the legend box. This new row would have the angle (0-360)
with " deg" concatenated. What is the expression for this row?

Example:

0 deg *5 deg 10 deg 15 deg

0, 5, 10, 15,

The expression must also work for angles from -180 to +180

* *-G



Pete_UK

Creating strings for legend
 
Or slightly simpler:

=TEXT(A2,"0")&" deg"

Hope this helps.

Pete

On Apr 27, 3:58*am, wrote:
Got it now.. the correct expression is:

* *=CONCATENATE(TEXT(A2,"0"), " deg")

* * * * * * * or

* *=CONCATENATE(TEXT(A2,"0"), " °")

where the ASCII code for the ° symbol is: *Alt+0176

* * -G



All times are GMT +1. The time now is 06:12 PM.

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