ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extract Cell Contents to String (https://www.excelbanter.com/excel-programming/403315-extract-cell-contents-string.html)

arm9047

Extract Cell Contents to String
 
Via a textbox, the user enters the two columns to be graphed against each
other. In the 4th row of each column is the column name. I need to extract
these column names to label the x and y axis of the graph.

Thanks so much!

Nigel[_2_]

Extract Cell Contents to String
 
You say A textbox, does that mean you have both column references in the one
text box value? If so how do you differentiate them, is it by a separator
value (comma maybe?) or something else?


--

Regards,
Nigel




"arm9047" wrote in message
...
Via a textbox, the user enters the two columns to be graphed against each
other. In the 4th row of each column is the column name. I need to
extract
these column names to label the x and y axis of the graph.

Thanks so much!



arm9047

Extract Cell Contents to String
 
Two text boxes, the inputs are put into two separate variables xAxis and yAxis.

"Nigel" wrote:

You say A textbox, does that mean you have both column references in the one
text box value? If so how do you differentiate them, is it by a separator
value (comma maybe?) or something else?


--

Regards,
Nigel




"arm9047" wrote in message
...
Via a textbox, the user enters the two columns to be graphed against each
other. In the 4th row of each column is the column name. I need to
extract
these column names to label the x and y axis of the graph.

Thanks so much!



Nigel[_2_]

Extract Cell Contents to String
 
Assumes textbox 1 and 2 are on the same sheet as the chart, no checking that
the users enters a valid column reference (letter), change chart reference
to suit.

With ActiveSheet
.ChartObjects("Chart 1").Activate
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = .Cells(4,
..TextBox1.Value)
ActiveChart.Axes(xlCategory, xlPrimary).AxisTitle.Text = .Cells(4,
..TextBox2.Value)
End With

--

Regards,
Nigel




"arm9047" wrote in message
...
Two text boxes, the inputs are put into two separate variables xAxis and
yAxis.

"Nigel" wrote:

You say A textbox, does that mean you have both column references in the
one
text box value? If so how do you differentiate them, is it by a
separator
value (comma maybe?) or something else?


--

Regards,
Nigel




"arm9047" wrote in message
...
Via a textbox, the user enters the two columns to be graphed against
each
other. In the 4th row of each column is the column name. I need to
extract
these column names to label the x and y axis of the graph.

Thanks so much!





All times are GMT +1. The time now is 02:51 AM.

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