Variables in Chart titles?

D

doofy

Is it possible to include a variable/cell link in the title of a chart?

My client is wanting the current date in each report run to show up in
the chart title, and doing it by hand each time is a pain.
 
J

Jon Peltier

Put the formula that builds the desired title text into a cell, then select
the text element (it works for chart title, axis titles, data labels, and
shapes), click in the formula bar and type =, then click on the cell. The
formula bar should now look something like:

=Sheet1!$A$1

but with the appropriate sheet and cell address.

- Jon
 
D

doofy

Jon said:
Put the formula that builds the desired title text into a cell, then select
the text element (it works for chart title, axis titles, data labels, and
shapes), click in the formula bar and type =, then click on the cell. The
formula bar should now look something like:

=Sheet1!$A$1

but with the appropriate sheet and cell address.

Hmmm....didn't work. Won't fill in the cell address for me. I did
write a macro to accomplish the same purpose, but it would be good if I
could get your suggestion to work.
 
B

Bob Phillips

doofy,

prefix the cell address with the sheet name, not just the cell, circa

=Sheet1!F1

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

doofy

Bob said:
doofy,

prefix the cell address with the sheet name, not just the cell, circa

=Sheet1!F1

Ok, I'm going into Chart Options, going to the Chart Title field. When
I try putting anything in there, it treats the whole thing as text, and
if I put an "=" then click into a field, it doesn't do anything but give
a "bonk" sound.

Should I not be going through Chart Options?
 
B

Bob Phillips

No, you select the title object within the chart, it will become surrounded
by a fuzzy box with dark squares at the corners and mid-points of each line.
Then type ='sheet name'!cell_reference in the formula bar.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

doofy

Bob said:
No, you select the title object within the chart, it will become surrounded
by a fuzzy box with dark squares at the corners and mid-points of each line.
Then type ='sheet name'!cell_reference in the formula bar.

That did it, thanks.
 
J

Jon Peltier

Once the text element in the chart is selected, you can type = in the
formula bar and click on the appropriate cell. No need to type out the
entire address. But at least you got it to work.

- Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top