hard times with seriescollection.xvalues problem

phn

New Member
Joined
Aug 16, 2011
Messages
3
hello,

I am programming chart of some time series and all the needed data is in excel sheets. Everything works fine except one thing: when I am taking event dates of time series (it is every last day of the month starting from 2008 01 31) from sheets I do not know how to rewrite them in different format, because it sheets it is given as:

310108, what would be as 2008.01.31 in my desiring format.

So my question would be:

imagine you have 3 data points, which occured on 310308, 300408 and 310508. Is it possible to copy these dates and somehow rewrite them in format of 2008.03.31, 2008.04.30 and 2008.05.31 into chart?


I would appreciate any help.

Regards,
Edgaras
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Hey,

cant you use something like

="20"&RIGHT(S1,2)&"."&MID(S1,3,2)&"."&LEFT(S1,2)

does this get it into the format you require?
 
Upvote 0
Yeah, but is it possible to write like this?

For i = j To total_number_of_data
ActiveSheet.SeriesCollection(1).XValues.Items(i).Values = "20" & "." & Right(ActiveSheet.Cells(2, i).Values, 2) & "." & Mid(ActiveSheet.Cells(2, i).Values, 3, 2) & "." & Left(ActiveSheet.Cells(2, i).Values, 2)
Next i


Because I get an error in this part:

ActiveSheet.SeriesCollection(1).XValues.Items(i).Values = "20" & "."....

How to edit that?

p.s. thanks for a reply!!
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top