Programing VB in excel
Closed
wael
-
Jun 17, 2009 at 06:50 AM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jun 17, 2009 at 08:29 PM
venkat1926 Posts 1864 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Jun 17, 2009 at 08:29 PM
Related:
- Programing VB in excel
- Excel date format dd.mm.yyyy - Guide
- Number to words in excel - Guide
- Screenshot in excel - Guide
- 1st, 2nd, 3rd position formula in excel ✓ - Office Software Forum
- How to enable vba in excel - Guide
1 reply
venkat1926
Posts
1864
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
810
Jun 17, 2009 at 08:29 PM
Jun 17, 2009 at 08:29 PM
do you want the two charts as different charts in the same sheet.
suppose the data is in C1 down in sheet1
and in D1 down in sheet2
in that run this macro. if the data are in different columns modify the macro suitably
give feedback
the macro is .
Sub test()
Dim rng As Range
On Error Resume Next
ActiveSheet.ChartObjects("mychart").Delete
suppose the data is in C1 down in sheet1
and in D1 down in sheet2
in that run this macro. if the data are in different columns modify the macro suitably
give feedback
the macro is .
Sub test()
Dim rng As Range
On Error Resume Next
ActiveSheet.ChartObjects("mychart").Delete
Charts.Add ActiveChart.ChartType = xlLineMarkers ActiveChart.SetSourceData Source:=Sheets("Sheet1").Range("C1:C6"), PlotBy:= _ xlColumns ActiveChart.Location where:=xlLocationAsObject, Name:="sheet1" ActiveChart.Parent.Name = "mychart" Worksheets("sheet2").Activate Set rng = Range(Range("d1"), Range("d1").End(xlDown)) rng.Copy Worksheets("sheet1").Activate ActiveSheet.ChartObjects("mychart").Select ActiveChart.SeriesCollection.Paste NewSeries:=True End Sub