Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Date range using macro including selected dates, exluding sundays and holidays

Posted on 2014-12-10
2
Medium Priority
?
294 Views
Last Modified: 2014-12-25
Hi all,

I need help with date range using macro including selected dates, exluding sundays and holidays.

What i want to do is the following:

On sheet Saturday:

Enter Start date (B12)
Enter End date (B13)
Select type (B14)
Select if there are working saturdays (B16 checkbox)
If working saturdays (checkbox checked), macro will list dates of saturdays in date range, and then you must choose which of them will you work


On sheet Types:

There are templates of, for this example, 2 types (there will be around 6, 7 types later).

I need help with macro that will, depending on Type copy type template from sheet Type to sheet Saturday (f4) and fill the date range (in columns) from starting date to ending date (both entered by user), including saturdays selected and exluding sundays and holidays (there si a list of holidays in V column on sheet Saturday). Macro should run by pressing button GENERATE.

I don't have any macro for that, because i'm quite new to macros and don't even know where to start it :)

There is Saturday_Final result sheet where is example how it should look at the end.

If anyone can help, i would appreciate it very much.

Kind regards,
Matija

date-range.xlsm
0
Comment
Question by:matija385
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 23

Accepted Solution

by:
Ejgil Hedegaard earned 2000 total points
ID: 40513748
Try attached file.
I have inserted some range names for start (B12) and end date (B13), type selection (B14), working saturdays (C12:D16), holidays (V2 to used), and copy insertion point (F4) on sheet Saturday.
The types on sheet Types are named Type1 and Type2.
date-range-copy-type.xlsm
0
 

Author Comment

by:matija385
ID: 40517421
Hi Ejgil,

This is perfect, just what i needed. Thank you so much.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question