Finds The Matching Date In The Timesheet

Apr 30, 2009

On Error GoTo importError
For Each b In Range("names")
If b = FILE.Sheets("Sheet2").Range("e3") Then
ThisWorkbook.Activate
ThisWorkbook.Sheets("Sheet2").Select
b.Row.Value = n
For Each c In Range("dates")
If c = FILE.Sheets("Sheet2").Range("e5") Then
ThisWorkbook.Activate
ThisWorkbook.Sheets("Sheet2").Select
c.Column.Value = m
ActiveCell = nm
Set Targ = ActiveCell
Targ = system
Targ = FILE.Sheets("Sheet2").Range("e20")

End If
Next

It doesnt work, it gets to b.row.value and throws up an error, i realise im using the wrong code but I dont know enough vba script to resolve the issue

I have a timesheet and a data base spreadsheet, the db spreadsheet opens the timesheet (many, one after another) and I want it to look for each name in the db and if the name cell on the timesheet it has open matches then i want it to remember the row value (on the db), then look through the dates in the db until it finds the matching date to the one in the timesheet, i want it to store this column value (in the db) so I can concat the row and column to get the activecell where I will be putting the total hours (a single cell reference) from the timesheets into the db.

View 9 Replies


ADVERTISEMENT

Formula That Finds Matching Last Name Then Looks To Match First 3 Letters Of First Name

May 21, 2014

In Column A I have first names, In column B I have last Names, in column C I have id letters,
Column D another list of First Names And In Column E I have another list of Last Names

So what I need to do in F2 is Look at the name Last name in E2 (Lets say its Smith) then look down the Last names In Column B when you find a match look at the First name on the same row to see if the first 3 letters are the same as the first 3 letters in D2 if they are then put the id that's in cell C into F2 if not ""

I've been trying for hours but no luck, also if you do manage to do it can you tell me how you get it to look at the first 3 letters and how I could change that to 4?

View 9 Replies View Related

Array Formula - Finds Date Then Start Adding Values Until Specified Sum Reached

Jul 23, 2014

I have an Excel workbook with two sheets "DataSheet" and "Actual Peaks", "DataSheet" contains a column with dates and a column with values. "Actual Peaks" has a bunch of dates listed in a column. For each date in 'Actual Peaks', another column goes back to the "DataSheet" finds the date, then starts adding values until a specified sum is reached, once the sum is reached, it returns the date at which the sum was reached. However, I have found that sometimes it is off by a day or two.

See the attached workbook for a much clearer example : Excel_forum help 7-23-14 DD validation.xlsx‎

View 7 Replies View Related

Next Date Matching Criteria Within Date Range

Jan 7, 2010

I'm setting up a spreadsheet to manage recurring tasks that fall within a given date range.

I have a named variable (theDate) which pulls the list of matching tasks that fall on a single day, but some fall on multiple days, so I need to somehow extract the next valid date the task will come due.

I've been playing with formulas until my brain got scrambled. I suspect I may not have got enough sleep over Christmas and there's something staring me in the face I'll kick myself over.

Column Headings are:
Description (Col B), [various notes C:E], M, T, W, T, F, S, S, (Cols F:L, marked with x when relevant), StartDate (M), EndDate (N) and my nemesis, NextDate.

That formula should check that 'theDate' falls within the range, if so, lookup whether the appropriate weekday is null or not, and if it's not, then the current date comes back. If it is, then I need it to find the next weekday (by that I don't mean M-F, I mean any of the 7) when it will fall and return that date. I do have the weekday number in F2 if needed, and I'm using a weekday return type of 2 (Mon=1).

'theDate' will usually be in the future, but not always. It needs to not fall over if it's past.

I'd like to do this via formula ideally, since the SOE I'm on keeps losing my Analysis Toolpak, but if I have to code, I have to code.

View 3 Replies View Related

Date Before A Date With Matching Criteria?

Mar 3, 2014

I have the attached spreadsheet and I need to find the date in the table that is less than the specified date in E3 and is also the animal specified in cell D3. So the formula should bring back the result 18/03/2013 (line 4) as that is the closest date before the given date and it is also a dog.

I know I probably need an array formula and some max ifs, I have tried a few combos but I can't get it going. I don't want to be able to do any sorting of the table I kind of want to keep that how it is.

DATE BEFORE DATE.xlsx

View 2 Replies View Related

Capture Billable Expenses & Non-billable Expenses To Timesheet According To Date

Jun 6, 2008

I am trying to capture billable and non-billable expenses in a time sheet by date. I thought it was pretty simple, but after a few days of battling with the syntax (I am pretty new to macros)

I have attached the file I am referring to and highlighted in yellow the significant cells.

1. Trying to get data from the all expense sheets to the "Time Sheet" Tab by date and category.
2. Need to show the billable expenses expanded out to each category (meals, hotel, etc.) by date.
3. All nonbillable is summed up in one column by date.

June expense report has:

Date of ReceiptExpense Type "Billable? Total USD
01-Jun-08 Airfare Yes - Recoverable$2,000.00
01-Jun-08 Airfare Yes - Recoverable$2,000.00
01-Jun-08 Ground Transport No - Training$20.00
05-Jun-08 Meals & Entertain Yes - Recoverable$15.00
05-Jun-08 Meals & Entertain Yes - Recoverable $50.00


1) There are TWO June 1, 2008 items that are "Airfare" & "Billable", therefore in the "Time Sheet Tab, I need it to show that under "Billable Airfare" for June 1, 2008 that it is $4,000.

2) Same as June 5, 2008 for Meals & Entertain.

3) All Non-billable (No - Training; No - XXXX; anything with NO) are summed up in one column by date in the "Time Sheet Tab"

4) There are multiple Expense reports and I need the macro to run through all of them dynamically as they input the data in to show on the "Time Sheet" tab.

This would make my job a lot easier if I could get this running. I dont' think it is too complex, but obviously too complex for me. I started on some of the vba below. I do not have all the parts yet, weird thing is, it did spit out a number, but now it is not. I'm at a loss.
...................................

View 9 Replies View Related

Matching Date In Excel

Aug 7, 2012

I have this nagging problem with my current data. So let i have two "sites" which contain a date column. Some of the dates matches. So i want to match this date in excel and not manually go cell by cell checking for a match. how can i do this with excel?

a better illustration of my question. So basically i want to match concord 4/1/1999 with the other concord of the same date.

Site name
Date
Data
Site name
Date
Data

concord
4/1/1999
0.1
Concord
3/1/1998
0.13

[Code] ........

View 4 Replies View Related

Matching Value In F:F To Lastest Date/time In A:A

Jan 15, 2010

I have to extract information from an imported .csv file. In the attached mock up A2:B223 is the data being imported. A macro list the individual values from B:B & C:C in F:F & G:G. I'm interested in a formula for I:I that will match the values in F:F to the most recent timestamp in A:A.

View 4 Replies View Related

Matching Two Sets Of Date And Displaying

May 8, 2012

I have two separate worksheets:

I'm trying to find a formula that looks at Column A on both sheets and if they match enter in column D of the referral sheet the month they were seen but only if its a 1st contact (appt type on column D of contact sheet)

ABCDReferralIDReferral Date409383316 January 2012 Month / year of referral Month of first contact
485955005 March 2012January 2012539372005 September 2011March 2012385048229 February 2012
September 2011483172202 December 2011February 2012944156617 January 2012December 2011
393039322 February 2012January 2012

ABCDContact IDcontact Datemonth / year of contactAppointment Type
539372026 January 2012January 20121ST385048205 March 2012March 20121ST944156616 December 2011
December 2011F/UP222944119 December 2011December 2011F/UP344055529 December 2011
December 2011F/UP539372010 September 2011September 20111st

View 8 Replies View Related

VBA - Find The First Matching Date Within A Range

Feb 19, 2009

In a row on the spreadsheet I have a range of dates from 19/09/2008 to 19/06/2008 mainly with a weekly interval.

I want to incorporate into the macro a find function so that it can determine the first occurrence of a specific month and return the row number.

View 9 Replies View Related

Sum Column With Date Matching Choice

Sep 11, 2007

I am trying to make an attendance sheet where if you open the file up on a specific date, the matching date from the columns is selected only and the sum of the column is put beside the cell that says available. I have attached the file I am trying to make.

View 3 Replies View Related

Offset Until Finds Value

Jun 16, 2007

I'm practicing my VBA and can't get this practice code to work, the syntax looks good but all it does is set the current cell to 23. and I want it to keep going up the column until it find a cell with any value and then change it to say 23. if the value is empty it should keep going up.

Sub chngevalue()

If ActiveCell.Value Is Nothing Then

ActiveCell.Offset(-1, 0).Select
Else
ActiveCell = 23
End If

End Sub

I did check the internet and my reference books and wasn't able to find a clear reason.

View 3 Replies View Related

Lookups For Separate Workbooks Matching Date

Feb 18, 2014

I have workbooks based on the date. Here is an example "Daily Numbers Report - Summary_2014_02-18-06-02-30"

All of the files are formatted this way. Then, in a master file I have dates going horizontally for the entire year in the following format Tue Jan 15, etc. How could I do a lookup that would grab from all of the open files and match the date BUT subtract 1 day from that date for all the lookups, so Feb 18 would look at 2-17?

View 5 Replies View Related

Matching Date In Another Sheet And Returning Cell Value

Mar 29, 2012

I have in my 'Daily' sheet I9 which needs a formula to look at the date in C9 and the scan range 'Weeks' F6:AN41 and find the cell with the matching date and then whatever text is in Row 2 of the column the date was in will be returned.

View 2 Replies View Related

Date Formating Of Text Box And Matching In Spreadsheet

Jan 13, 2009

I am trying to make compatible for international users. They enter bike rides via a form. When the user hits submit Excel finds the date and then posts the ride info.

The problem is that if I format the date textbox (textbox1) as international the date inputted in textbox1 isn't being found in the column.

Code when the form initializes ...

View 9 Replies View Related

Returning Matching Value From An Array Based On A MAX Date.

Feb 25, 2010

I have an Excel spreadsheet (XP - 2007) listing Job Nos. in the first column, with several columns of Station assignments and dates.
Both planned dates and actual dates are included, adjacent to each other. The dates are not necessarily in a straight ascending or descending order. Separate arrays exist for: Plan Nametags, Actual Nametags, Plan Dates, Actual Dates.

Example:

Job No.Sta1 PlanSta1 ActSta2 PlanSta2 ActSta3 PlanSta3 Act1A10001-Feb-101-Feb-106-Feb-106-Feb-101-Mar-101A100116-Feb-1016-Feb-1019-Feb-1022-Feb-105-Mar-101A100225-Feb-1025-Feb-102-Mar-104-Mar-1010-Mar-10@
@
I need to capture two pieces of information for each Job No. on a daily basis:
1- The 'Planned' Station for the build, based on a match of the 'Plan' date fields to a pre-populated 'Report Date'.
I've been able to do this (using INDEX-MATCH function).
2- The 'Actual' Station location for the build, based on the Maximum 'Actual' date entry in the row for each build.
(In the example above, Job# 1A1001 would have an 'Actual' location of 'Sta2 Act'...)
I need to figure out how to accomplish step (2) above. I've made several attempts with INDEX-MATCH and LOOKUP functions, without success.

View 10 Replies View Related

Hiding Columns Based On Date Matching

Feb 15, 2010

I would like to write a macro that automatically hides columns of data
based on the value of a cell (I2) with a picklist. Cell I2's picklist is
monthly values (formatted as Jan-10 though Dec-10 but real values are
1/1/2010 through 12/1/2010). I have a range that contains work week end date
values (1/8/2010 to 12/31/2010) in L6:BK6. I would like to have the macro
hide columns that are less than date value chosen in I2.....

View 3 Replies View Related

Delete Rows Not Matching Date Variable

Mar 10, 2008

I have a need to call a sheet from another sheet, copy two pages from the newly opened, existing sheet to a new workbook, search one sheet of the new workbook for any entries that don't contain a variable I specify, which is the first four digits of the field, and delete them. The sheets represent a daily view of jobs (identified by the "RptDate" variable) and an entire monthly list of jobs, which I want to delete all of them not from the date specified in the variable "RptDate". The fields in column A contain the date in "mmdd" format as the first four digits, and I have that specified in the "B1" celll of the originating workbook.

I found some code in this link Search Column Delete Row If Value Found that looked good. I had to modify it since I needed to search for a variable (RptDate) and needed to search column A and start on row 8 of that column. My current code looks like this:

Sub Macro1()

Dim RptDate As String
Dim RptMonth As String
Dim iLastRow As Long
Dim i As Long
RptDate = Range("B1").Text
RptMonth = Range("B2").Text
Workbooks.Open Filename:=(RptMonth)
Sheets( Array(RptDate, "Total Database")).Copy
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 8 Step -1
If Left(Cells(i, "A").Value, 4) <> RptDate Then
Rows(i).Delete
End If
Next i
End Sub

It works fine right up to the "Rows(i).Delete" line. It errors out with a "run-time error 1004, delete method of range class failed" and highlights the above line. I know the fields I'm pulling the variables from are working right since it opens the correct workbook off of one of them.

View 6 Replies View Related

Delete E&F Row If F Row Finds Blank Vba?

Mar 13, 2014

i want delete row E&F depends upon blank cells in range of F:F column...though vba

View 6 Replies View Related

Deletes A Row If It Finds A Specified Value In A Specified Column

Dec 23, 2009

deletes a row if it finds a specified value in a specified column (in this instance, "NB" in column E). However, it is very slow and some end users are complaining about the amount of time it takes to run. Here's what I'm using at the moment:

View 5 Replies View Related

Finds Breaks In The Values

Dec 17, 2007

I have a macro that needs to walk down a list of values and when it finds breaks in the values, it will insert a formula for a calculation. The problem I'm having is getting the code to loop correctly until it finally finds the value "End" when it should stop (when I play around with the code, sometimes I can get it to continue the loop, but it blows past "End" and then it experiences an error because it can't end.

Sheets("Master").Select
Range("B1").Select
ActiveCell.Offset(1, 0).Select
AssetIDStartRange = ActiveCell.Address
X = 0
Do
ActiveCell.Offset(1, 0).Select
X = X + 1
Loop Until ActiveCell.Value ""
SortCriteriaName = ActiveCell.Value
ActiveCell.Offset(-1, 1).Select
ActiveCell.Formula = "=SUMIF($B13:$B5000," & """" & SortCriteriaName & """" & ",$H$13:$H$5000)"
ActiveCell.Offset(0, -1).Select

If ActiveCell.Value "End" Then....................

View 9 Replies View Related

IF Statemen T- To Finds The Most Recent X Or O

Aug 17, 2009

I'm tying to finds the most recent X or O. Then takes the price on that day and compares it to the current price and based on the difference either higher or lower puts out an X if the current price is higher and an O if the current price is lower by the Half StartData - however when i get to about 6 IF statement it freeze up and it wont give me the X or O's ...

View 9 Replies View Related

FileSearch Never Finds My Files

May 20, 2006

I'm trying to get a count of the number of workbooks in a directory and it keeps returning 0 when there are three WBs in the directory. What am I doing wrong?
Here is my code.

With Application.FileSearch
.LookIn = "C:Documents and Settingsdt64864DesktopTesting"
.Filename = "*.xls"
.FileType = msoFileTypeExcelWorkbooks
.Execute
MsgBox (.FoundFiles.Count)
End With

View 9 Replies View Related

Timesheet #2

Mar 19, 2008

This one should be a bit more simple, (vlookups I think)

I have a list of clients, and client codes

so:

CODE_____CLIENT

001 Mr. A
002 Mr. B
003 Mr. C

And on the time sheets, we must put the client, and the code.

So

0004 Mr D

But we have to type that in manually (code and client)

Can we use a formula, so that when we type the client, the code will appear? Granted that the name will have to be exactly perfect.

Also, how it it possible, to make a list of possibles to appear, when typinig?

eg, if I type Graem

a list will appear underneath saying the possibilities.

such as

Graem
-Graeme A
-Graeme B
-Graeme C

ETC.

View 9 Replies View Related

Return Latest Date Based On Matching Criteria

Jul 25, 2014

I am looking for a formula that returns the latest Sale date for a each model of car. Below is sample data which I am trying to use the formula. I tried with below formula, but not successful.

=MAX(INDEX($A$1:$C$40,MATCH(A2,$A$1:$C$40,0),3),1)

MakeModelSale Date
AudiA4 11-Jan-14
AudiA4 quattro 12-Jan-14
AudiA4 quattro3-Jan-14
AudiA5 Cabriolet 14-Jan-14
AudiA5 Cabriolet q15-Jan-14
AudiA4 16-Jan-14
AudiA4 quattro17-Jan-14
AudiA4 quattro18-Jan-14
AudiA6 quattro19-Jan-14
AudiA4 10-Jan-14
AudiA4 quattro09-Jan-14
AudiA4 quattro10-Jan-14
AudiA4 11-Jan-14
AudiA4 quattro11-Jan-14
AudiA4 quattro11-Jan-14
AudiA8L 11-Jan-14
AudiA8L 11-Jan-14

View 3 Replies View Related

Find Value Matching Multiple Text Criteria And Max Date

Jun 7, 2009

I have the following dataset:

[Date] [Category] [Currency] [ExchangeRate] [.....], etc.
1-3-09 A USD 0,8
1-6-09 A EUR 1
1-7-09 A USD 0,7
1-8-09 B USD 0,9
1-9-09 B USD <formula>

I'd like to have the value of <formula> looked up in older records. Currency and category should match and it should pick the exchange rate with the maximum date.

Which formula and what syntax should I use to have this done?

I use Excel 2007.

View 10 Replies View Related

Implementing A Row Which Finds Rows Which Match It

Feb 1, 2008

I'm looking to have a row at the top of a worksheet which I can type in, so that only the rows below which contain that information will show up. For example, say I have the following 3 rows, 2 columns each:

Cat Feet
Cat Head
Dog Feet

I'd like to have an additional row so that if I typed in "Cat" only the "Cat Feet" and "Cat Head" rows would show up. Likewise, if I typed in "Head" in the proper column only ""Cat Head" would show up.

View 10 Replies View Related

Application File Search Finds Nothing

Jun 23, 2009

I'm simply trying to search a directory for .xls files and count them. I have previously used the following code successfully to do so, but for some reason it has recently stopped working. Debugging shows .FileSearch.Count() = 0 after every search. I have atleast half a dozen .xls files in the "Reports" folder relative to the active workbook.

strReportDirectory = ActiveWorkbook.Path & "Reports"
With Application.FileSearch
.NewSearch
.LookIn = strReportDirectory
.SearchSubFolders = False
.Filename = "*.xls"
.Execute

'loop through each workbook in the directory
For i = 1 To .FoundFiles.Count
msgbox("I found: " & .FoundFiles(i))
next i

View 9 Replies View Related

VLookup Finds No Matches When There Are Visually

Jan 25, 2010

I need to add a space in front of a string of numbers/letters, but it still doesn't seem to match what's in the lookup range. Granted, i get the lookup range from HQ, so there may be a formatting issue.

View 2 Replies View Related

Vba Code Finds Max Value Of Column Subset

Oct 17, 2006

I need a piece of VBA code to assign to an Excel form that determines the maximum value of a subset of one column whose cognate rows in an adjoining column satisfy a particular value.

View 2 Replies View Related







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