+ Reply to Thread
Results 1 to 4 of 4

How i can have the data in quarters instead of month with Excel VBA Macro

  1. #1
    Registered User
    Join Date
    03-23-2016
    Location
    Malta
    MS-Off Ver
    2016
    Posts
    2

    How i can have the data in quarters instead of month with Excel VBA Macro

    Hi,

    I had created a Macro with VBA and created a month chart.See the code below

    Please Login or Register  to view this content.
    How i can create the chart with a quarter data in the place of displaying months it will display Q1, Q2, Q3, Q4.

    Is that possible to create with VBA?

    Thanks in advance.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How i can have the data in quarters instead of month with Excel VBA Macro

    Why are you doing this in VBA? It seems like what you want to do can be accomplished with a Pivot Table.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    03-23-2016
    Location
    Malta
    MS-Off Ver
    2016
    Posts
    2

    Re: How i can have the data in quarters instead of month with Excel VBA Macro

    As i need to do that not mauanlly. I will use that macro for a lot of things so it a way to automate some work.

    It is not possible to do with VBA?

    Also could you explain what you mean saying Pivot Table please?

    Thanks in advance.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: How i can have the data in quarters instead of month with Excel VBA Macro

    That's a big question. The short answer is that if you put the cursor in your source data (provided it is suitably formatted) and click Insert -> Pivot table, it will create a pivot table template. You can then drag the various column headers to one of 4 quadrants. The data gets summarized according to what you drag into which quadrant.

    For example, if you have the dates as row headers (lower left quadrant) and a numeric value as the values (lower right quadrant), all the dates will be shown down the left margin, and a sum of the values for each date next to it. You can also do a count of data, average, standard deviation. maximum ...

    I suggest you do a web search for a tutorial on pivot tables. They are fairly easy to set up, but like everything else in Excel, you can also get more complicated.

    One of the features is that if you display a date as either a row header or a column header, you can group the date. You can show by year, by month, by year and month, by days (e.g. get weekly totals in 7 day increments) and by quarter.

    Pivot tables sometimes refresh when the source data is refreshed or when you right click in the data and select refresh or when you click on refresh all. You can also make it refresh using VB code.

    You can build charts directly from pivot tables, or in some cases overlay them with named dynamic ranges for charting.

    If you can provide a sample workbook, and an explanation of where the data comes from and how you fill it in and a mock up of what you want it to look like, it would help us understand the requirement better and offer a solution.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. need vba code for making 3 month intervals (quarters) using date
    By nlink222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-22-2015, 02:45 PM
  2. Pivot Table to Summarize Data by Quarters
    By Karen615 in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 01-04-2015, 09:55 PM
  3. Bar Chart of Quarters when data is by month?
    By scopo911 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-16-2014, 02:34 PM
  4. Subtracting Quarters in Excel
    By ryth6498 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-09-2014, 05:06 PM
  5. [SOLVED] Formula for Monthly Data into Quarters
    By bjnockle in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-25-2014, 09:01 PM
  6. Break Data into Quarters or Thirds
    By mma3824 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-04-2013, 07:21 PM
  7. Replies: 1
    Last Post: 05-17-2006, 05:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1