Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8606363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:04:37+00:00 2026-06-12T03:04:37+00:00

I have three sets of data and each has two columns. The first column

  • 0

I have three sets of data and each has two columns.
The first column is Date and second column is Price. The dates are formatted different with each data set eg. Gold’s date(1951), Money Supply M2’s date (1951-01), and Money Sup. M3 Date (9/01/1951)

What i need:

I want to chart these with dates on x-axis and price on y-axis

Questions:

  • do i need to make Gold’s Date(YYYY) and Money Supply M2’s Date(YYYY-MM) a date object?
  • if so how?
  • do i need to place all dates in one column and create a sub to help sort the Price with appropriate Date?

Does this make sense?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:04:38+00:00Added an answer on June 12, 2026 at 3:04 am

    I have very little experience programming in VBA and was having a hard time finding info on using dates. I came across an Answer, given by the person who edited this (brettdj), that listed a few extremely helpful sights on VBA programming for excel. One of those had info on the DateSerial() function. I was then able to throw together some code to quickly fix my problem.

    Sub CreateDates()

    Dim dt As Date
    Dim s As String
    
    For Each c In Worksheets("Sheet1").Range("A7:A27080").Cells
        s = Len(c.Value)
    
        If s = 4 Then '(YYYY)
            dt = DateSerial(s, 7, 1)
            c.Value = dt
        End If
    
        If s = 7 Then '(YYYY-MM)
            y = Left(s, 4)
            m = Right(s, 2)
            dt = DateSerial(y, m, 1)
            c.Value = dt
        End If
    
    Next c
    

    End Sub

    I could probably spend some time and add some regular expressions and make a one-size fits most, but this will work as i want have to use it very often.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background I have a table which has six columns. The first three columns create
Say I have two sets of data, each entry consisting of a weight. Each
I have three sets of checkboxes (serviceA, B & C) with 5 checkboxes each,
I have a bunch of sets of data (between 50 to 500 points, each
I have two large data sets and I am attempting to reformat the older
Have two sets of data (two tables) for patient records, one 1999-2003, the other
Here's the situation. I have two sets of data. One is a list of
I have a table of items, each of which has a date associated with
I have an array which contains sets of three similar named items; however, sometimes
i have three lists with the same number of elements in each other, i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.