ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   automating a chart (https://www.excelbanter.com/excel-programming/292984-automating-chart.html)

alldreams

automating a chart
 
Hi All,

In DATA! I keep historical prices of my inventory. Items
are listed in Columm A, Date & Price are in Rows. I
recorded a macro to create a chart for one item.
However, I'd like to have a macro to prompt me for the
item and then create the chart. Could you help me with
this?

you help is greatly appreciated!

Robert Rosenberg

automating a chart
 
What do you mean by item?

--
__________________
Robert Rosenberg
R-COR Consulting Services
Microsoft MVP - Excel


"ALLDREAMS" wrote in message
...
Hi All,

In DATA! I keep historical prices of my inventory. Items
are listed in Columm A, Date & Price are in Rows. I
recorded a macro to create a chart for one item.
However, I'd like to have a macro to prompt me for the
item and then create the chart. Could you help me with
this?

you help is greatly appreciated!




No Name

automating a chart
 
the items in my inventory. I list them horizontally, the
dates and prices for each item go in rows vertically.


-----Original Message-----
What do you mean by item?

--
__________________
Robert Rosenberg
R-COR Consulting Services
Microsoft MVP - Excel


"ALLDREAMS" wrote

in message
...
Hi All,

In DATA! I keep historical prices of my inventory.

Items
are listed in Columm A, Date & Price are in Rows. I
recorded a macro to create a chart for one item.
However, I'd like to have a macro to prompt me for the
item and then create the chart. Could you help me with
this?

you help is greatly appreciated!



.


LeninVMS

automating a chart
 
Hi ALLDreams,

Here is a "non-elegant" solution:


Assume you have items "a", "b" and "c" in your first column (column 1)

1. Select all items (and dates and prices)
2. Create the chart you want
3. Select the entire area and apply autofilter.
4. Use a macro with the following code:

Dim SelectedItem as String
SelectedItem=Inputbox("Enter Item :")
'Error checks and validation
Selection.AutoFilter Field:=1, Criteria1:=SelectedItem


Your chart will automatically update for item you have entered.

Regards
Leni

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 12:27 AM.

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