+ Reply to Thread
Results 1 to 6 of 6

Help in macro indicating number of people going on a holiday on the same week

Hybrid View

  1. #1
    Registered User
    Join Date
    08-11-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    28

    Help in macro indicating number of people going on a holiday on the same week

    Hi Everyone,


    I would appreciate your help on this. I'm currently learning how to create simple macro but couldn't get my head this one.


    Basically I just want to identify the number of people travelling on the same day in a week.

    I want my result to be shown as below:

    Dates 1-5 Dec 1985, 8 (no of people)
    6-10 Dec 1985, 1 (no of people)
    11-15 Dec 1985, 2 (no of people)
    16-20 Dec 1985, 4 (no of people)
    21-25 Dec 1985, 1 (no of people)
    26-31 Dec 1985 6 (no of people)


    NAME DATES
    A 12/4/1985
    B 12/8/1985
    C 12/13/1985
    D 12/14/1985 E 12/21/1985 F 12/26/1985
    G 12/3/1985
    H 12/28/1985
    I 12/19/1985
    J 12/3/1985
    K 12/3/1985
    L 12/5/1985
    M 12/3/1985
    N 12/17/1985
    O 12/17/1985
    P 12/30/1985
    Q 12/30/1985
    R 12/5/1985
    S 12/17/1985
    T 12/30/1985
    U 12/5/1985
    V 12/30/1985


    Many Thanks in advance.
    Attached Files Attached Files
    Last edited by grlnexdor; 12-17-2013 at 11:57 AM.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Help in macro indicating number of people going on a holiday on the same week

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    08-11-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Help in macro indicating number of people going on a holiday on the same week

    Hi Sixth Sense,

    I just did upload an attachment.. let me know if the information required is enough.

    Thanks!

  4. #4
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: Help in macro indicating number of people going on a holiday on the same week

    Hi,

    this will do the job :


    =SUMPRODUCT(--($B$2:$B$21>=D1),--($B$2:$B$21<=E1))
    Enter the start date and end data in cells d1 and e1 respectively and your data table is starting from cell a1.
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Help in macro indicating number of people going on a holiday on the same week

    Try the attached. If you want to add a longer list of the date range, just add on from E9 onwards, and in the same format as above.
    Attached Files Attached Files
    Last edited by millz; 12-16-2013 at 04:43 AM. Reason: Re-attached file, just noticed you are using Excel 2003

  6. #6
    Registered User
    Join Date
    08-11-2010
    Location
    Singapore
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: Help in macro indicating number of people going on a holiday on the same week

    works great! thank you so much!!

+ 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. Replies: 1
    Last Post: 10-04-2013, 10:04 AM
  2. [SOLVED] IF function using WORKDAYS and a Bank Holiday list - trying to add new holiday dates
    By jowarks in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-05-2013, 05:42 AM
  3. [SOLVED] Work week holiday for different countries
    By Data_Lisa in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-07-2006, 02:40 PM
  4. Replies: 0
    Last Post: 08-28-2005, 11:33 AM
  5. Replies: 0
    Last Post: 08-23-2005, 11:59 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