Extract Data Within Date Range

Sep 22, 2007

I have a an excel file which has 2 columns of data. 1st column indicates the date. 2nd column indicates the data associated with the date.

I would want to create a code that is able to extract the dates that is able to let user select the date range and its associated data and copy it into another worksheet.
But it seems that my below code fails. Can anybody give me some advice?

For eg in the attachment file, the Raw Data worksheet contains all the infomation and i wish to copy all the data from 8thJuly07 to 30thJuly07 to another sheet named Edited Data.

Sub date_choice()
Dim i As Integer, j As Integer
Dim end_date_last_occurence As Integer, No_of_end_date_occurence As Integer
Dim strt_date_1st_occurence_row(1 To 10000) As Variant
Dim end_date_1st_occurence_row(1 To 10000) As Variant

Raw_data_last_row = Range("A" & Rows.Count).End(xlUp).Row 'Get the last row no

Sheets(1).Name = "Raw Data"
start_Date = InputBox("Enter Start Date", "Start Date", "dd,mm,yy")
end_Date = InputBox("Enter End Date", "End Date", "dd,mm,yy")

View 8 Replies


ADVERTISEMENT

Macro Or Userform For Extract Data From Multiple Workbooks By Giving Date Range

Apr 2, 2014

I jst need to console data from different workbooks to one worksheet. There are 30 workbooks & each workbook contains one worksheet name as Data. The work i am currently doing mentioned below step wise

1) Open workbook
2) Apply filter on whole data
3) Select dates from "J" Column (E.g 02/10/2014 to 02/20/2014)
4) Then Copy whole filtered data
5)Paste into New workbook
6) Open another worbook
7) repeate Step # 2,3
8)Then paste whole data in below the first data New Workbook (In which we have paste the first data below that i will paste this data)

These steps i have to do manually it takes almost 1hr daily After pasting all 30 workbooks data in one workbook i have to make pivot of it & sent it to my Manager. What i need

I jst want a excel macro that will ask me date range from which i have to pull data from all 30 workbooks.

Once i gave date range will jst click on button say extract or pull. It willl console whole 30 workbooks data from the given date range in a one worksheet.

View 13 Replies View Related

Extract Data With Differing Date Formats - Convert Text To Date

Mar 27, 2013

Extract data with differing date formats that I need to convert to something consistent that I can format as a date.

This is an example of data.... all with general format at the moment.

2/28/2013 2:48:53 PM

1/16/2013 10:48:50 AM

12/17/2012 11:59:49 AM

I have used this formula to extract the date portion, but I can't get this to then format as date. How do I convert this to the julian date, so I can then apply a date format?

=LEFT(G9,SEARCH("/",G9)+7)

(The day portion of this date always has a leading zero).

View 9 Replies View Related

Extract Unique Values From Column B Between Date Range Textbox1 And Textbox2

Jul 3, 2007

Sheet1 has following two columns

----A----------B
01-07-2007---10
01-07-2007---20
02-07-2007---30
02-07-2007---40
02-07-2007---40
03-07-2007---60
03-07-2007---70
03-07-2007---70
03-07-2007---90
04-07-2007---100
04-07-2007---110

Sheet2 has following three cotrols

Textbox1=02-07-2007
Textbox2=03-07-2007
combobox=?

I want to Extract Unique values from column B between date range textbox1 and textbox2 and finally how to add these unique records in combox1

View 3 Replies View Related

Selecting Data From A Date Range Based On The Current Date

Jun 20, 2013

I created a basic excel weekly budget and would like to know how much money I have as of todays date. on the top row I have a date range from Sunday to Saturday, so it looks like this:

09-15 16-22 23-29

with the month manually put in above it.

then below I have income and expenses with a Overall below that, so basically what I want to is see the Overall value based on todays date, not sure how to do this with the weekly range and automatic current date(which is =TODAY() as far as I know) I have attached a photo as a reference.

Budget Picture.jpg

View 12 Replies View Related

Extract Latest Date To Particular Date From Different Date List

Mar 9, 2014

i have several styles to handle mentioned under different rows separately.

all the styles have their various raw materials inward date mentioned under different column of their respective rows from column Q to Y

now i need to 1. extract the latest date of any particular raw material which can be in any of column from Q to y columns ACCORDING TO DIFFERENT STYLES IN A Particular row automatically that is AC

View 1 Replies View Related

Extract Character From Date Format & Number Of Days Between Date

Jan 17, 2010

I have two questions regarding date format and hope you can provide input.

1) say 01/01/2010 displays as Jan-10 and i need a new column to state it as JAN. What function should i use to achieve it?

2) i need to state the difference between first day and last day of the month. What function should i use to achieve it?

View 2 Replies View Related

Sorting Data By Date Within A Date Range

Dec 31, 2009

Hello, I have a question about sorting information using dates but using a range. I need this to sort when I enter a date range into the spreadsheet (the blue blocks on the attached spreadsheet). The factors in colum G need to be sorted by month and input into the yellow highlighted area in column B. There may be an easier way of pulling the data from the "Data" sheet but this was the best I could figure out. Overall, January (or any of the months)needs to have the January (or appropriate) factor that fits within the date range that was input but sorted properly based on the months listed in Column A.

View 6 Replies View Related

Sum Data In Date Range With VBA?

Apr 23, 2014

I would like to total or sum data within a date range. The dates will change and be added to often. The data needs to be totaled for each month. I have used the SUMIFS formula successfully but i would like to try it using VBA if its possible.

This is the formula I used :

=SUMIFS($B$2:$B$9,$A$2:$A$9,">=" & $D$2, $A$2:$A$9,"<=" & $E$2)

My cells and pages are different.

Date Revenue
11/15/2013$10,000.00
11/16/2013$15,000.00
12/1/2013$100.00
12/5/2013$300.00
12/6/2013$5,000.00
1/5/2014$8,000.00
1/6/2014$11,000.00
2/10/2014$12,000.00

View 4 Replies View Related

Sum Data By Entering Date Range

Feb 2, 2014

I have a spreadsheet that records water consumption in L/s at 5 minute intervals. I've attached an example of the data collected during January 2012.

Is there any formula that will calculate the total amount of water consumed between a user-entered date range? For example:

From: 01/01/12 00:00 (User enters 'from date and time' in an allocated cell)
To: 20/01/12 23:55 (User enters 'to date and time' in an allocated cell)
Consumption: ______ (Formula generated result in Litres)

View 3 Replies View Related

Selecting Data Over A Date Range

Sep 12, 2009

I have 2 worksheets where I need to transfer a certain amount of data from one to another depending on dates.

Sheet ‘A’, is the main data source. Col A holds all 365 dates from 1 Jan to 31 Dec(starting at A2), and the subsequent data for each day is held in cols B to P.
Sheet ‘B’ is the destination where the user will specify a key date in cell A3, then in A4 to A32, formulae populate the next 29 dates (ie so there is a continuous run of 30 days).

What I need to do, is to identify the same 30 day range from sheet B on sheet A, then to copy the data in Cols B to P for that range back onto sheet B (pasting in at D3)

View 8 Replies View Related

SUMPRODUCT Data Within Certain Date Range?

Nov 28, 2012

I have been having problems with a function trying to count data within 2 date ranges.

When inserting the 2 dates required into collum B2 (week beginning) + B3 (week ending) it does not

View 8 Replies View Related

How To Pull Certain Data Based On Date Range

Apr 22, 2014

I'm compiling data from field reps that comes in a big spread sheet. I want to pull the rows out that fall into a certain date range. For example, if it falls between January and March. How would I do this?

Company 1
3/5/14
$54,000
Q1
Phase I
10%

Company 2
2/1/14
$16,000
Q4
Phase II
80%

Company 3
12/1/13
$18,000
Q2
Phase I
20%

View 4 Replies View Related

Extract Date

Jul 22, 2009

Once a week I recieve a data file from another department and their report shows the period starting as well as ending but in text format all in one cell.

How can I extract the two dates to show the srart date in one cell and the end date in another. The example that would arrive in cell A1 is:

Reporting Period: 01/01/2009 00:00 to 07/05/2009 23:59

The hours and minutes do not matter.

View 9 Replies View Related

Enter Custom Date Range To Show Data

Dec 10, 2008

I took an Excel course in college but am a bit rusty. I have a customer database that I created and I would like to see certain things after entering a date range that I specify. I uploaded a small excel sheet to show my database and what I'm looking to do. Basically I would like to enter a date range and see these answers:

Total Orders in that date range
Total unique orders in that date range
List of customers (name included) who ordered more than once in that date range

The only columns of data I need to use are: firstname, lastname and orderdate.

View 4 Replies View Related

Extract Date From Filename For New Tab

May 9, 2014

Every week we produce a report that has the filename: Master_BER_Pending Revokes Report_YYYY-MM-DD.xlsm

Some of the information from this workbook needs to be pasted into a new tab on a different workbook. The new tabs naming convention is simply "DD MM". Currently I've got a command prop that asks the user to enter it in manually. See below

VB:

Dim newsh As String
newsh = InputBox(Prompt:="Enter new tab name", Title:="Tab Name", Default:="e.g. '05 05'")
Sheets.Add After:=Sheets(Sheets.Count)
Sheets(Sheets.Count).Select
ActiveSheet.Name = newsh

The user gets the information for the month and day from the filename of the report that was produced. What I need is the DD and MM to be extracted from the filename and used to name the new sheet.

View 6 Replies View Related

Extract Date From Cell

Jul 8, 2014

In cell A1 i have a drop-down list.

In this list are the following:
London [S] (14/02/2013)
Rome [W] (23/10/2013)
Tokyo [W] (17/01/2014)
Berlin [A] (24/02/2014)
...and so on...

In cell B1 I would like to extract the currently selected city name and the [?] (e.g. "London [S]")
In cell C1 i would like to extract the currently selected date (e.g. (14/02/2013)

View 6 Replies View Related

Extract Date From File Name

Dec 19, 2009

I need to extract the date from the following file name format:

C:Documents and SettingsRezDesktopExcel forumQueue Performance Phone Daily15_Dec_2009.csv

i have macro running where this file path gets save as a string and i can paste this string in a cell, is there a way i can use a few extra line of code to extract only the date from this string and paste only the date? or the other way for this would be use formula to convert this to a date.

View 5 Replies View Related

Extract Date Only From String

Jul 2, 2010

What I want to do is extract the date only from a string of text in a cell and put it in the cell next to it. The date is not alway in the same position within the text string and although similiar, the text string can differ. There are around 6000 lines in the sheet, I've pasted 4 as an example below.

THE BIG COMPANY LTD 15312178 COLLECTION 14.12.09
The Small Company Ltd 19073864 COLLECTION
DATE 17/05/10 511438 511437 511436 ORD LE
The Medium Size Company 19080948 COLLECTING WEDS 26/05/10
The Very Good Company 19149554 COLL DATE:28.06.2010 175 PEA PARK ROAD Z7 9AB

View 9 Replies View Related

How To Extract Date From String

Jul 17, 2013

I want to extract date from string My dates are going to increase every 9 days. as you can see in table given bellow. And goes till Wk52

Wk1-> 02-Jan-11
02-Jan-11
Wk2-> 09-Jan-11
09-Jan-11
Wk3-> 16-Jan-11
16-Jan-11
Wk4-> 23-Jan-11
23-Jan-11
Wk5-> 30-Jan-11
30-Jan-11

View 2 Replies View Related

Extract Date From Text

Dec 26, 2013

Any formula that can extract from a time stamp text string, which looks as follows: 7/8/2013 7:10:33 AM.

The tricky bit is saying anything before the first "/" represents the month, anything between the 1st and 2nd "/" represent the date, and the 4 digits after the second "/" represents the year.

View 9 Replies View Related

Extract Row By Most Recent Date

Aug 7, 2007

I have data resembling the following

Col A
Sun
Sun
Sun
Sun

Col B
12/08/2007
13/08/2007
14/08/2007
15/08/2007

Col C
A
B
C
D

Is there a formula where I can extract the entire row for the most recent date, in this case Row 4 containing Sun,15/08/2007,D would be returned.

View 9 Replies View Related

Extract Date From Text

Dec 15, 2008

I have some dates with text, I want to extract dates from the text. Here is an example.
Sheet1

AB1ORIGINALI WANT2PREVIOUSLY CAPITALIZED 3Capitalize 09/05 per FMS 9/30/20054Capitalization date 11/05 11/30/20055PREVIOUSLY CAPITALIZED 6Capitalize 12/05 per FMS 12/31/20057Capitalize 08/05 per FMS 8/31/20058PREVIOUSLY CAPITALIZED 9Capitalize 09/05 per FMS 9/30/200510Capitalize 12/05 per FMS 12/31/200511CAPITALIZE 12/2006 12/31/200612PREVIOUSLY CAPITALIZED 13PREVIOUSLY CAPITALIZED 14Capitalize 09/05 per FMS 9/30/200515Capitalize 03/05 per FMS 3/31/200516Capitalize 12/05 per FMS 12/31/200517PREVIOUSLY CAPITALIZED, CAPITALIZE 12/06 12/31/2006

Excel tables to the web >> Excel Jeanie HTML 4

View 9 Replies View Related

Extract Date From Cell

Jul 31, 2007

I've had a question which i can't solved cause of poor knowledge. Example of my issue: cel A1 are filled with a lotnumber like 107610618. as 107=year 2007 61=code of product 06=month 18=runnumber. in cel B1 i would like to have a few characters of that lotnumber visible. all that i want to show in cel B1 = month & year example 0607. Then when this is done in cel C1 i would like to convert this characters into june-07.

View 6 Replies View Related

Copy Data Based On Date Range Put In By User For Report

May 16, 2006

I have looked through the forum and found pits and peices but can not put the puzzle together. Found the VBA code in my example from a earlier post but there was no final answer to the post.

Trying to have the user put in a date range via command button. Fro mthis date range the data thats falls within that range is copied to a report sheet. Will also need to have all the old data from a earlier querry removed. Have attached example sheet.

View 9 Replies View Related

Pull Data Out Of A Closed File Based On A Date Range

Jun 15, 2006

I am trying to make Excel pull data out of a closed file based on a date range. The closed file is a log where people input data and enter the day they are doing it. I need to pull this data in my file and make it print into my worksheets so I can pass a report on to others with only the data they request from the log.

The range would be for 7 days and would have to be able to choose a few columns off this report.

View 9 Replies View Related

Extract Time From Date And Calculate

Dec 3, 2013

I am trying to use and if formula to see if the time on the cell was before a certain time.

The date is entered on Cell A2 - down and I would like to enter a formula in Cell B2 to say if the time on A2 is before 12pm as an example, "Complete" otherwise "Incomplete"

Example 1

Cell A2 : 01/10/2013 13:08:00

Cell B2 formula result: "Incomplete" (Because it was after 12pm)

Example 2

Cell A2 : 04/10/2013 10:05:00

Cell B2 formula result: "Complete" (Because it was before 12pm)

View 2 Replies View Related

Extract Date And Time From A String

Feb 19, 2014

I have this data & would like to extract the date in dd/mm/yy and the time stamp separately to use in some calcs.

Jan 10, 2014 4:47 AM
Jan 10, 2014 4:47 AM
Jan 14, 2014 4:30 PM
Jan 15, 2014 4:00 PM
Jan 16, 2014 5:01 PM

View 10 Replies View Related

Extract Date From Cell With Other Strings

Dec 22, 2008

i have data in column A and i want extract to column B only the date from this data. Date start on diferent position.
ex:

col. A
1 text text 10.10.1998 text
2 text10.12.2001
3 10.12.2004
4 10.12.2005 text text

i want this result
col. B
1 10.10.1998
2 10.12.2001
3 10.12.2004
4 10.12.2005

i try solution from other thread, but it doesnt works for me.

View 10 Replies View Related

Extract AM / PM As Text From Date / Time?

Oct 19, 2010

I have a column of times, that are actually dates of 1/0/1900 plus time, from which I want to extract the AM or PM status. I can format it to show this, but it's really just a fraction of a day. I need the actual text "AM" or "PM", not a decimal value.

Is there a formula to do this?

View 9 Replies View Related







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