ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Insert String Between Dates in Chart Title (https://www.excelbanter.com/excel-worksheet-functions/208097-insert-string-between-dates-chart-title.html)

RyanH

Insert String Between Dates in Chart Title
 
I have a chart that displays data between two dates. I want the title to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan

klswvu[_2_]

Insert String Between Dates in Chart Title
 
If you are entering this in the Excel formula bar, try:

=A2&" to"&B2

The syntax looks like you are using VBA code outside of a macro.



"RyanH" wrote:

I have a chart that displays data between two dates. I want the title to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan


Peo Sjoblom[_2_]

Insert String Between Dates in Chart Title
 
One way would be to put this formula in a cell, assume you put it in K3

(or hide it away in IV2 or something)


=TEXT(Summary!$A$2,"mm/dd/yyyy")&" to "&TEXT(Summary!$B$2,"mm/dd/yyyy")


(adapt to fit the regional date format you are using)



then click in the title of the chart and type an equal sign and click on K3


so the title when selected would read


=Summary!$K$3



that way it would be dynamic and display as


10/12/2008 to 10/28/2008



as an example

--


Regards,


Peo Sjoblom

"RyanH" wrote in message
...
I have a chart that displays data between two dates. I want the title to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan




RyanH

Insert String Between Dates in Chart Title
 
I apologize for the confusion. I am not writing VBA code. I tried entering
what you have and I get an Exclamation MsgBox saying "References in series
formulas must be external references to worksheet."

A few more details. The chart is embedded in a worksheet, it is not its own
worksheet. When I select the title of the chart and then enter =Summary!$A$2
Excel accepts that and the title show the date in A2. but when I enter
=Summary!$A$2&" to "&Summary!$B$2 Excel doesn't except it.
--
Cheers,
Ryan


"klswvu" wrote:

If you are entering this in the Excel formula bar, try:

=A2&" to"&B2

The syntax looks like you are using VBA code outside of a macro.



"RyanH" wrote:

I have a chart that displays data between two dates. I want the title to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan


RyanH

Insert String Between Dates in Chart Title
 
I tried this already in another cell and it works fine:
=TEXT(Summary!$A$2,"mm/dd/yyyy")&" to "&TEXT(Summary!$B$2,"mm/dd/yyyy")


Any ideas on why you can't put this in the formula bar for the chart title?
--
Cheers,
Ryan


"Peo Sjoblom" wrote:

One way would be to put this formula in a cell, assume you put it in K3

(or hide it away in IV2 or something)


=TEXT(Summary!$A$2,"mm/dd/yyyy")&" to "&TEXT(Summary!$B$2,"mm/dd/yyyy")


(adapt to fit the regional date format you are using)



then click in the title of the chart and type an equal sign and click on K3


so the title when selected would read


=Summary!$K$3



that way it would be dynamic and display as


10/12/2008 to 10/28/2008



as an example

--


Regards,


Peo Sjoblom

"RyanH" wrote in message
...
I have a chart that displays data between two dates. I want the title to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan





Peo Sjoblom[_2_]

Insert String Between Dates in Chart Title
 
I expect that you can only link directly to a cell, not using any function
within that link

--


Regards,


Peo Sjoblom

"RyanH" wrote in message
...
I tried this already in another cell and it works fine:
=TEXT(Summary!$A$2,"mm/dd/yyyy")&" to "&TEXT(Summary!$B$2,"mm/dd/yyyy")


Any ideas on why you can't put this in the formula bar for the chart
title?
--
Cheers,
Ryan


"Peo Sjoblom" wrote:

One way would be to put this formula in a cell, assume you put it in K3

(or hide it away in IV2 or something)


=TEXT(Summary!$A$2,"mm/dd/yyyy")&" to "&TEXT(Summary!$B$2,"mm/dd/yyyy")


(adapt to fit the regional date format you are using)



then click in the title of the chart and type an equal sign and click on
K3


so the title when selected would read


=Summary!$K$3



that way it would be dynamic and display as


10/12/2008 to 10/28/2008



as an example

--


Regards,


Peo Sjoblom

"RyanH" wrote in message
...
I have a chart that displays data between two dates. I want the title
to
read like this:

Range("A2").Value & " to " & Range("B2").Value

I highlighted the title box and entered this in the formula bar and
Excel
will not accept it, why?

=Summary!$A$2&" to "&Summary!$B$2
--
Cheers,
Ryan








All times are GMT +1. The time now is 10:03 PM.

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