Generate A List With The Date Of Every Other Friday

May 30, 2009

On my timesheet, there is a button that, when clicked, allows you to select a pay period end date. Our pay periods end every other Friday. When the button is clicked, it opens a form I designed that has a listbox that I manually entered every pay period for the year into. Here is the code I used:

Private Sub UserForm_Initialize()
' Populate the ListBox control.
listPayPeriodEndDates.AddItem "04/03/09"
listPayPeriodEndDates.AddItem "04/17/09"
listPayPeriodEndDates.AddItem "05/01/09"
listPayPeriodEndDates.AddItem "05/15/09"
listPayPeriodEndDates.AddItem "05/29/09"
listPayPeriodEndDates.AddItem "06/05/09"
listPayPeriodEndDates.AddItem "06/19/09"
listPayPeriodEndDates.AddItem "07/03/09"
listPayPeriodEndDates.AddItem "07/17/09"
listPayPeriodEndDates.AddItem "07/31/09"
listPayPeriodEndDates.AddItem "08/07/09"
listPayPeriodEndDates.AddItem "08/21/09"
listPayPeriodEndDates.AddItem "09/04/09"........................

What I'd like to do instead is have VBA populate the listbox (or combobox or what have you) dynamically, by using a reference point (say, the first pay period of the year) and then populating every other Friday from that point forward. Also, it would be great if it could reference the current date as to only list pay period end dates in the future (or even the two prior to todays date, and then maybe 3 or 4 pay period end dates in the future).

View 10 Replies


ADVERTISEMENT

Generate File List With Name / Date / Size

Jun 10, 2013

I have a folder containing about 100,000 files and subfolders. Approximately 20% of the files are duplicates. I would like to create a list of all the files with some details so that I can sort through and identify which ones are duplicates, then create a batch file to delete them. How to get a file list with additional details, like size, modified date, etc, into an excel format?

View 3 Replies View Related

Move Date To Next Monday If Date Is On Friday / Saturday Or Sunday

Aug 24, 2014

I have a list of dates and I need a formula that will return the date of the following Monday, IF the date falls on a Friday, Saturday or Sunday.

View 3 Replies View Related

Find Pay Date From Date Sold (Friday Of Following Week)

Feb 17, 2014

If a sale was made between 2/09/2014 - 2/15/2014 return the date of the following weeks Friday. In this case 02/21/2014.

View 3 Replies View Related

How To Get Last Friday Date Based On Current Date

Feb 14, 2013

I need to work out how to get the last (or most recent) Friday date. Suppose today is 14/02/2013, then the previous date is: 08/02/2013. If today is 15/02/2013, then I just want it to be 15/02/2013 as it is Friday.

View 3 Replies View Related

Returning The Date For Last Friday?

Feb 12, 2008

how to write an excel workbook function that will return last friday's date?

For example: If Today is 2/12/2008, it will return 2/8/2008 as the date

View 6 Replies View Related

Get Date Of Last Friday In Month?

Mar 25, 2012

If there's one thing I really wish I understood more in Excel its how to use formulas to calculate days and times.

I'm looking for a formula that will give me the date of the last Friday in a month based on another date. I have the formula below at the moment that works quite nicely for March 2012 but not for any others. It's getting the 5 at the end to be more flexible that's got me stumped.

=DATE( YEAR(H12), MONTH(H12) + 1, 0) - (WEEKDAY( DATE( YEAR(H12), MONTH(H12) + 1, 0), 2) - 5 )

View 2 Replies View Related

Calculating Friday Date

Aug 7, 2006

I have dates listed in column A indicating the day an action was performed. In column B I need to have the date in column A changed to a Friday. If the date in column A is not a Friday, then the date in column B needs to fall back to the previous Friday. For example, if the date entered in column A is today, Monday August 7, then the date in column B that I would be Friday August 4. Can anyone think of code that determine this and place the value in column B? Currently I use vlookup to go to another sheet where all the possible dates are listed with their respective Fridays, but this slows down the calculation worksheet as the file is quite large.

View 9 Replies View Related

Determining Date Of 2nd Or Last Friday Of Any Month?

Sep 14, 2008

Without VB, is there a way to write a formula which when given a certain month, will output the date of, let's say, 2nd or last friday of the month?

View 14 Replies View Related

Formula Return Following Wednesday Or Friday Date

Jun 10, 2008

Need a formula for cell J27 that returns the date of the following Wednesday from a date in cell J2 that's a Wed, Thurs, or Fri
or
return the date of the following Friday for a date in cell J2 that's Sat, Sun, Mon, or Tue.

For example, when 05-29-08, a Thursday, is entered in cell F2, I need cell J27 to return the following Wednesday's date of 6-04-08.
or
For example, when 06-01-08, a Sunday, is entered in cell F2, I need cell J27 to return the following Friday's date of 06-06-08.

View 9 Replies View Related

Calculate Date Of Next Occurring 3rd Friday Of Month?

Oct 18, 2013

I am trying to calculate the Date of the next occurring 3rd Friday of the month in relation to a Static Date in a cell. So if Static Date in cell is Tuesday of the second week of a month, then I am trying to return the date of the 3rd Friday of that month. If the static date in the cell is the third friday of the month, I just want to return that particular date. And if the static date is after the 3rd Friday of the month, I am trying to return the 3rd friday of the following month. So far here is the formula I am using:

Code:
=DATE(YEAR(A2),MONTH(A2),14+CHOOSE(WEEKDAY(DATE(YEAR(A2),MONTH(A2),4)),2,1,7,6,5,4,3))

The problem I have is that if the static date is after the third friday of the month, this continues to return the 3rd friday of the month of the static date and does not advance to the third friday of the following month. Looks like I cannot attached a sample spreadsheet but here is a screenshot of the sample sheet:

[URL]

View 4 Replies View Related

Change Cell Color If Date Equals To Friday

Mar 18, 2009

is there anyway I can do a conditional formatting of something like that to color a cell if the date in the cell is a friday?

Dates will appear in a column like this:
16-mar
17-mar
20-mar (this is a friday, it should be red)
21-mar
21-mar

View 4 Replies View Related

VBA Code To Return Previous Friday And Month Before Date

May 8, 2014

How to write a VBA code so that it would calculate the date of the previous Friday and from there Return the date exactly 1 month before; on any given day.

For example...
today is may 8th

So if I run the code the dates returned for last friday should be 05/02/2014
and 04/04/2014 should be returned AS the DATE exactly a month from 05/02/2014

View 6 Replies View Related

Generate From Larger List Short List That Meets Multiple Criteria?

Mar 27, 2014

I have a large amount of data, 40,000+ rows about how students do in remedial classes including from whom they took the classes. I have pulled from it a subset of student success as relates to the separate instructors. Now I would like to extract a consolidated list of those instructors for whom the student gain on criterion based pre and post course assessments is above a specific level. I have no trouble writing if statements that will look at two types of data, the course taken and the average student increase to determine which instructors meet or surpass the criterion, but I can only do that within a list that includes all the instructors. Because there are more than an hundred such instructors, it would be easier for the dean if I could provide a short list of those that meet specific criteria. I believe that it would be an array that I should use, but I have been fooling around with this for 2 days now, and am finding myself at a series of deadends!

View 5 Replies View Related

Drop-Down List: Generate A List Based On The Value Of A Cell

Jan 7, 2009

I am trying to generate a list based on the value of a cell. That list will then be used as the range for a drop-down list. Example: Cell A1 returns a value of 15
A drop-down list displays the values 1 through 15. Cell A1 changes to 20
Drop-down list displays the values 1 through 20. I assume I'll need a two-step macro to accomplish this but I can't figure out the logic to populate the drop-down.

View 3 Replies View Related

Using A List In A Pivot Table To Generate A List On Another Sheet

Jul 29, 2008

I have a set of accounts (general ledger accounts) that the accounting group posts expenses to. every once in awhile a new account is added. This is captured through a pivot that i have built (sheet A).

on another sheet (sheetB) i want to display the accounts that are shown in the pivot so that i can forecast their future activity.

What i am trying to figure out is how can i make the list on Sheet B change when new accounts are added to the pivot on Sheet A (without simply referencing the pivot table making one cell equal the other)? I am not looking for a data validation pull down, i want a full list of the accounts.

View 9 Replies View Related

Excel 2007 :: Count Number Of Days Between Two Date Where Off Days Are Friday / Saturday And Holiday

Mar 14, 2014

I am making process TAT(Turn Around Time) which required following information. In Excel 2007.

1-Count number of days between two dates where working days are (Sun to Thursday). So required to exclude (Friday,Sat + Holidays)

A1-Start Date Mar/01/2014
B1-End Date Mar/31/2014
C1-No Of Days 22
D1-Days between two dates 21
E1 To E10-Holidays

2-Count number of days between two dates where working days are (Sat to Thursday). So required to exclude (Friday + Holidays)

A1-Start Date Mar/01/2014
B1-End Date Mar/31/2014
C1-No Of Days 27
D1-Days between two dates 26
E1 To E10-Holidays

Note : Any weekend (off days) dates listed in holidays should not effect the query.

View 9 Replies View Related

Vba Programming Generate List?

Nov 18, 2012

I am looking for a code to generate a combinations of x numbers taken 5 at the time. t

View 2 Replies View Related

Auto Generate List

Feb 26, 2008

I have an event that is one week long (7 days), with three functions happening each day (7 days - 3 columns per day).

There are 11 groups with various number of possible attendees listed in rows. Attendees of a given function is indicated by entry of a 1 or 2 (attending partner), Blank = not attending.
I would like to show a list of the attendees for a given function by clicking or moving my mouse pointer on the event function column header.

The list would need to be automatically updated when the attendees status changes (entry or deletion of 1 or 2)

View 14 Replies View Related

Generate Three Different Results From One List

Feb 25, 2010

Find attached an example sheet. I have one list with data... Name, Handle, Result. I want to have three lists from that data

List 1 would have top ten highest results
List 2 would have top ten lowest results

Some results will be the same so I would need each Name listed as they appear in the main list until ten is reached. List 3 would have top ten handle, but would not include anyone in list 1 or 2. This will be a shared workbook

View 3 Replies View Related

Generate Sheets For Each Name In List

Aug 20, 2007

I have a long list that is geneerated each week and I need to split them based on their category acrross a number of sheets all named by the category. These sheets don't exist at the beginning.

My list would be like:

Col A Col B
UK Dave
UK Bill
UK Ann
US Bob
AUS Sheila
AUS Bruce

I want to run a macro down the list and build sheets for each unique ColA ie UK, US and AUS and then copy the ColB values into the correct sheets so UK has Dave, Bill and Ann in colA of the sheet named UK. anyone have an example of this type of process.

View 2 Replies View Related

How To Generate User-defined List

Mar 6, 2012

This is what I'm trying to achieve: Display a list box (or any other appropriate form/active X control) to get input from the users which is usually a list of several terms. Once they've input the list, upon clicking 'OK' it should add them all to Col. B.

The above request WILL be a good solution, but if there is an advanced solution to this for eg., something like a list box with buttons, for instance: click on 'Articles' and it populates 'a,' 'an,' & 'the, click on 'Prepositions' and it populates all the pre-fed prepositions, etc. that would be PERFECT!

View 9 Replies View Related

Generate List Based On Differences?

Apr 22, 2012

How to generate a list base on the differences of another list. let me explain; I have a list of combination A1:F2200 each row of course the numbers have difference, example:

589162045620273342451261419316121721264271837414551

As you see the difference in the first row for this small example is 317425 and the list base on this difference is :

145121641256131742367141843478151944589162045691017214671011182247811
1219234891213202449101314212550111415222651121516232752131617242853

The maximum number is 53. doing this one time find, but I have to do it with my 2200 difference.

View 9 Replies View Related

Generate New File For Each Entry Of A List

Aug 19, 2009

I have a database file with a list of components. Each component has manufacturers name, part number, description etc. I need to create an individual file from each of the components in the list. I would like a quick and easy way to copy the information in each Row and generate a new file for each Row containing the existing template I have.

View 9 Replies View Related

Generate List That Match Criteria

Nov 23, 2006

I have been working on a project with 30 products and 20 different companies.

I am working on a business case, where there are launch dates for various companies with expected sales, contribution margin, NPV etc.

The idea is that I can create specific scenarios (What is Company1 doesn't launch the products, etc), and there is an accompanying each company. Because it can be difficult to see what products are included in the current calculations, I would like to use some kind of function that produces a list that matches my criteria. (In this case, all cells for a company that are larger than 0).

I would like to find a function that finds all products that have a launch date and create a list of them -- without spaces between non-matched results. And that it updates whenever data is changed (new launch year or new product in company's profile)

I have included a generic excel file to show what I am going for.

View 4 Replies View Related

Generate Drop Down List From Another Sheet

Jan 4, 2008

I am trying to create a list, I know how to do this on the same sheet, I need to be able to have the list informaiton on a data sheet that contains other information that I need to have to populate other parts of the sheet. then I need to add this list data so that I can have drop down options so that users can pick from selected work descriptions

View 2 Replies View Related

VBA To Generate Row For Each Date In Date Range

Feb 13, 2007

I've created a userform to track attendance. The code below creates entries based on the activities undertaken on that day; one row for each activity reflecting Name, ID, date, Activity and comments. The intent is that several activities can be undertaking on a day, and the code generates separate rows for each activity....

View 9 Replies View Related

Generate Matrix Of Buttons From List Of Values

Feb 20, 2013

Maybe this problem is not too much complicated for some of you experts. I have this:

I have in sheet "Products", in column A, a lists of Products from row 2 to N. (Product 1 , Product 2, Product 15, Product 37, etc).

How to generate in sheet "Menu" a matrix of buttons with the label of each button taken from the value of each cell in column A of sheet1.

I mean, the buttons would have the label Product 1 , Product 2, Product 15, Product 37, etc. Each button associated with macro "My_Macro".

I would like that the buttons be organize as simetrical as possible (regarding number of rows and columns)

* I'm attaching sample file with input in sheet "Products" and output desired for those few products. The real list could have 100 Products.

View 6 Replies View Related

List Box Selected Item To Generate Sheet Name

Feb 12, 2014

The below is causing me an issue as it is setting the ws value to equal nothing instead of sheet1 or sheet2 etc. I have my dimensions set above and there are no spelling mistakes.

It falls down on the
VB : Set LastRow = ws.Range("a65536").End(xlUp)
line but this seems to happen because ws is set to nothing.

VB:
For iramp2 = 0 To ListBox1.ListCount - 1
If ListBox1.Selected(iramp2) Then
Set ws = ActiveWorkbook.Sheets("Sheet" & iramp2)
End If

[Code] .....

View 4 Replies View Related

Generate Unique List Meeting Criteria?

Apr 21, 2014

I have 2 columns of data in one sheet that list dates (say Master Dates) and transactions (say Master Transactions).

In another sheet i would like a formula that can choose the correct transactions that fall between certain dates (call Date Beginning and Date End) and generate a list.

i have tried this array:

If((Master Dates>=Date Beginning)*(Master Dates<Date End),Master Transactions,"")

Problem with this is when used in different columns for different date ranges there are large gaps in the generated list...

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved