Counts The Number Of Hours That This Person Works & Lookup Function

Jan 25, 2008

I'm trying to create a work Rota and I'm having a bit of a problem with a certain section. In Worksheet 1 I have the following headings:

Cell A - Name
Cell B - Monday
Cell C - Tuesday
Cell D - Wednesday
etc

Under these headings is each member of staff and the hours they work, IE L (Late), E (Early), SD (Short Day) etc. In the final Column, it counts the number of hours that this person works (Early is 7.5). In Rows 46, there is a section here to work out how many people are working earlys, which is where I have the problem.

The hours are worked out by doing a lookup function on the cell that says E, L etc and goes to a CODES sheet and pulls the value of that letter. What I am wanting to do is lookup that Letter, which and look in the cell next to it and count how many people would be on an early etc.

View 5 Replies


ADVERTISEMENT

Lookup (counts The Number Of Items Which Match Criteria Set By The User)

Aug 30, 2009

=LOOKUP($C1,$A1:$A1,$B1:$B1)

Though i wanted to rid the Na error from it when C is blank

I seen a few ways, And wanted to try the method of using Countif becouse it can be used withen the same cell without using extra cells like another method i seen "=IF(ISNA(A1),0,A1)"

what i know of countif
This function counts the number of items which match criteria set by the user.
=IF(COUNTIF($A1,"")),LOOKUP($C1,$A1:$A1,$B1:$B1),"")

so how the heck can the countif function be used to rid the NA of a lookup. i just cant see a relationship between counting a lookup.

View 5 Replies View Related

Finding All Occurrences Of Person's Name And Calculating Hours Worked

Jan 28, 2014

I'm trying to create a macro that will take name values from a list (Last name, First name) and then find these particular names in a long list of names in another sheet. Once all the occurrences of the name are found, the macro would need to add up all the hours that the person has worked during a given month. For example, I have Jane Doe and John Smith on my shortlist, the macro would have to take the name of the first person, Jane Doe, find all the occurrences of that name in the second sheet that contains names, dates and hours worked, then add up all the hours worked by that person and return the total hours worked value for that parson. Then take the name of the second person, John Smith, and do the same, and so on. Is it possible to do it with macros?

View 2 Replies View Related

Search Formula - Lookup Person Name In Given Worksheet In Specified Cell?

Jan 15, 2014

How to create a search formula that will look up a person's name in a given worksheet in a specified cell?

View 8 Replies View Related

VBA DATEDIFF Function To Calculate Person Age

Jul 9, 2012

I'm struggling with the VBA DATEDIFF function. I have a person's DOB and am attempting to determine their age by comparing to a different date. It seems like their age only changes when I change the year, rather than choose a date within the year past their birth date... Here is my code:

Sub Test_click()
DOB1 = #7/19/1930# 'DOB
date2 = #7/18/2012#
Date3 = #7/21/2012#
age1 = DateDiff("yyyy", DOB1, date2) 'age should be 81 (but is 82)
age2 = DateDiff("yyyy", DOB1, date2) 'age is 82 (correct)
End Sub

View 5 Replies View Related

Excel 2010 :: VBA Sheets Copy Function Works But Then Jumps To Beginning Of Function

Apr 8, 2014

I'm having trouble using the worksheet copy command in a VBA subroutine. I have the following line in my code:

[Code] ........

When I step through my code and execute this line, the sheet is copied as expected and put in the correct place, but then instead of the next line of code being highlighted, the pointer jumps to the first line of a function (in a different module) in my code.

View 14 Replies View Related

Match Time In And Time Out By Person Then Add For Hours?

May 13, 2014

We have a bar code scanner that scans employee IDs as they come and go each day. Beside the ID is the date/time stamp in the next column. They do not always come in in the same order they leave, so I am looking for a solution that will collect the in and out time for each ID, then add those times beside each employee name, and add them for a hourly total.

View 10 Replies View Related

IF Function Inform If Person Worked Over 6 Months In 2008

Feb 1, 2009

I have attached a worksheet that shows the last and first name of an employee along with their hire date and term date, if termed. What I am looking for is a function that will tell me if a person was active as of 12/31/08 which will read true on the side of their name under active; I also need a function that will tell me if a person worked over 6 months in 2008.

The first person John Doe was hired in 2005 and has a true on the side of his name which meant that he was active as of 12/31/08 but as you can see Jane Doe has true on the side of her hire date and false on the side of her term date and I don't want it to read the first true but the last true of someones name, but Jane Doe qualifies for working over 6 months even though she started in 2007.

View 7 Replies View Related

Lookup With Multiple Criteria: Return The Amount Paid And Full Cost Based On The Person's Name And The Date

Apr 21, 2006

I would like a lookup that takes multiple criteria and that is not an array formula! Unfortunately I decided to use array formulae and my spreadsheet went to over 45mb!! Not good. I've searched the forum for an answer to my questions but couldn't find any! I've attached a spreadsheet as an example. The examples I am using have {Sum(IF)} formulae in it (array) and I would like to change those to others that will not increase the file size so much and will not take too long to calculate.

Basically, I would like a lookup that will return me the Amount Paid and Full Cost based on the person's name and the date. the data and the results table are both on separate sheets. It would be nice to bring that file's size back down to less than 4mb!!

View 7 Replies View Related

Dateif Function That Counts The Starting Date?

Jul 28, 2014

I have the following formula to count the time between two dates and result in an answer with months/days:

=DATEDIF(E14,E15,"M")&" months "&DATEDIF(E14,E15,"MD")&" days"

The problem is that the function does not count the start date. Is there any way to modify this formula so that the start date is included?

For example if the start date is 02/01/2012 and the end date is 02/28/2012 it results in 27 days but I want it to result in 28 days or 1 month.

how to go about this or if there are any better date functions out there?

View 2 Replies View Related

Counts Down The Days Of The Month Each Day Using The Today Function

Jan 23, 2009

I have a formula in a cell that counts down the days of the month each day using the today function...that part works perfect...But I have some conditional formatting that highlights the row when their is only 5 days left. Basically the row stays highlighted yellow for anything >=0 ="0",$BJ3

View 9 Replies View Related

Count Number Of X In Column When X Is In Same Row As Person Name

Oct 15, 2012

I have a spreadsheet that I want to use to plan projects across days and I want to assign a task to any one of four people. there maybe more than one task in any project that the same person may be assign to. Want I want to do is count how many assignments they have on that day. I've tried using things like vlookup, row(), hlookup and a various combinations of these with countif, or maybe dcount, I'm just not sure, but I think I'm finding it too tricky.

I've uploaded the sheet here..[URL] .....

So in other words how many tasks does person y have if the x is on their row. The person is a data validated drop down list so if the person changes from y to b then this will effect the total at the bottom.

View 2 Replies View Related

Number Of Calls Made By A Person In A Month

Sep 5, 2013

The first column is "Person Name" and the second column is date in format "6/27/2013". I want a formula to calculate the total number of calls a person made in the month of June.

View 2 Replies View Related

Create A Formula To Pull The Person's Name And The Avg Number Of Cartons

Dec 5, 2007

I am trying to create a formula to pull the person's name and the avg number of cartons sorted for the month from this spreadsheet.

I've attached a sample of the spreadsheet I created, you will see at the bottom I would like to see the person that had the highest avg for the month and the person with the lowest avg for the month.

This is just a simple spreadsheet to track productivity of my sortation employees.

View 9 Replies View Related

Sum(if Formula) Counts The Number Of Cell And Add

Jun 17, 2009

I have an array formula which reads:

{=SUM(IF(Female2!$A$2:$A$5000=$A403,IF(Female2!$C$2:$C$5000=C$402,IF(Female2!$1:$1=C$401,1,0))))}

However this formula only counts the number of cells (returns 96 for 96 cells) rather than adding the numbers in those cells to come to a total of 34.

View 4 Replies View Related

Return Number Of Item In A Column (Counts)

Jun 10, 2013

I am trying to see if there is a way using count or another option, of using one formula to look in a column and then spit out how many of each item are there:

i.e: lets say it says a, b, c, d etc...

Can a formula go through and say you have 3 of a, 5 of b and so on

I understand the basic of count sum iserror etc, just not sure if excel can do what I am wanting or if i should use access.

View 2 Replies View Related

Explanation For Formula That Counts Number Of Numeric Characters

Nov 21, 2012

The formula below was posted recently as a way to extract a numeric substring from somewhere in larger string. When I first saw this formula, how it "came up with the goods" and so I spent some time looking at parts of it to see what they did.

Although I've made some progress, I still don't fully understand it. Heres the formula, and below Ive detailed how far I've got:

=Iferror(lookup(9.99e+307,--mid(a1,min(find({1,2,3,4,5,6,7,8,9,0},a1&1234567890)),row(indirect("1:"&len(a1))))),0)

I hope my findings below are correct:

1. The formula is returning the first substring of contiguous numeric characters from the full string in Cell A1
2. 9.99e + 307 ensures that the search value won't be exceeded by the returned value.
3. The Mid function uses Min(Find( to get the character position of the first numeric in A1 (so MID then has its first 2 parameters). So far so good.
4. Now... I cant work out where MID parameter 3 (the substring length) comes from. I suspect its the row function, but can't see how as this isn't an array formula, and without CTRL+Shift+ Enter, I could only get Row to return 1 in my experiments (giving me only the first substring digit).

How does the formula return the correct number of numeric characters, (apparently) without counting them?

View 3 Replies View Related

Rounding Function Works On 1 PC But Not Another

Dec 1, 2008

I have a very simple spreadsheet that I use for preparing quotations. It was created on my PC at home and includes a simple roundup function (=ROUNDUP((F199*G199)+F199 2) ).

I now use this spreadsheet on my PC at the office and the function works perfectly well but if I try to edit it, or create a similar rounding fx, on my office PC I keep getting the error message "You've entered too few arguments for this function".

I've tried using the Help Menu in Excel but even if I copy one of the formulas from the Help Menu into the spreadsheet I still get the error message. The 2 versions of Excel are the same (2003). I tried inserting a ',' and a ';' in front of the '2' but this has also not helped.

I have attached a sample of the offending spreadsheet. The rounding function is in column "B"

View 10 Replies View Related

IF Function Only Works With 7 Different Selections

Aug 26, 2002

I’m trying to do the following IF function but as far I can tell IF only works with 7 different selections.

Cell B2 contains the numbers I through 8
Cell D2 contains a pre-calculated number (e.g. 53.012)
Cell F2 is the cell that I need an IF function or something similar – the function would be as follows
=IF(B2=1,D2*1.000)
=IF(B2=2,D2*1.00057)
=IF(B2=3,D2*1.00171)
=IF(B2=4,D2*1.002281)
=IF(B2=5,D2*1.003421)
=IF(B2=6,D2*1.003991)
=IF(B2=7,D2*1.004215)
=IF(B2=8,D2*1.004538)

View 9 Replies View Related

Mod Function Works Wrong

Dec 28, 2006

I was trying to explain modulus to someone and they wanted to know why you can "flip" symbols mod(-6,7) = 1 in Excel. So I got to explaining that -6 Mod 7 is the same as -6-(|-6/7|)*7 which is how you get 1.

And that's when I realized... |-6/7| = 0 not -1. Then I looked in VBA and sure enough -6 mod 7 = -6. Apparently the problem boils down to the Integer conversion. Excel is performing the integer coversion by rounding down (INT) wheras VBA appears to be using CINT.

So here is how it work out in excel:
-6-(|-6/7|)*7
-6-(|-0.857142857|)*7
-6-(-1)*7
-6--7
-6+7=1

But in VBA you get
-6-(|-6/7|)*7
-6-(|-0.857142857|)*7
-6-(0)*7
-6-0=-6

View 9 Replies View Related

Int Function Only Works With Double

Aug 15, 2006

If you run the Int function on a product of two variables, it will return a different (wrong) result if the variables are both defined as single:

Sub roundingtest()
Dim a As single
Dim b As single
Dim cases As Integer
a = 18200
b = 0.01
cases = Int(a * b)
Debug.Print cases;
End Sub

this returns 181 instead of 182. If you define one of the variables as double, then it works fine. Is it just me?

Anyway, I found it to be quite useful, as i was trying to get a function to round to the first higher integer - as opposed to the first lower. so
182.1 -> 183
182.9 ->183
182 ->182

So weirdly enough, int(a*b)+1 does the trick! Of course if a or b is defined as a double, then it all goes to 182. So without any IFs, this works real nice!

View 4 Replies View Related

Code That Counts Number Of Time String Occurs In Column?

Jul 5, 2014

I need a code that search through a column, counts the numer of times a string occurs and creates on another sheet the unique string and the number of times it occured.

e.g

I have this columns in a worksheet

s/n name company trainer
1 ball Dell Mk
2 doll Msed Kl
3 kol Dlink Mk
4 ball Msed Cl
5 Koll Dell Gl

I need the result to appear on another worksheet like this

Name NumberofTraining
Ball 2
doll 1
Koll 2

View 9 Replies View Related

Conditional Format: Counts The Number Of F's In The Range AN38:AY38

Jun 18, 2007

In cell BI38 I have a function which counts the number of F's in the range AN38:AY38. I want the cell AM38 to turn blue if the value in BI38 >=3. Is there a simple way to do this?

View 8 Replies View Related

Today Function Works Strange

Aug 24, 2009

I have a column, where i want to calculate the difference between today and another date/or viceversa. The problem is, that in the first two cells, it calculates it well, but then, it shows #VALUE and when I press to see the "calculations steps" , it shows "29/09/2009"-40049. It turns the today function into a number. Why?

View 11 Replies View Related

Function Works But Get Runtime Error 13?

May 20, 2014

This is a function to add the ascii values of a string to give a single value. Initially I wrote this as a Sub routine and it worked fine, but when making it into a function, I get this error. From a little research it appears that you can not use a string as an argument for a function call, yet that defeats the object of this particular function.

The intention of this function is that it works on a name in a given cell and the value (an integer) that is produced is then displayed in another cell, or if using it as a formula, the cell the formula is in.

I simple wrote the work "Hello" in cell A1 the ascii values of these added ignoring any spaces give 500 which is correct.

View 3 Replies View Related

INDEX Function Works In Cell But Not In VBA

Mar 25, 2013

I've been working on a payroll program for my small biz. I'm close to done BUT...

When I use the Index Match function in a cell it works great. However I need to copy it down a column to work for pay periods going forward. When I copy it down of course it puts zeros or N/A.

Columns:

Gross Fed FICA Medicare State Net
F G H I J K

Gross is user input. FICA Medicare State and Net are simply calculated on the sheet. But to get Fed Income tax I use the Index Match function and it works perfectly. The rows increment properly with each new user input.

Code:

=INDEX(SingleWH!C$6:M$140,MATCH(G7,SingleWH!A$6:A$140,1),MATCH(E$1,SingleWH!C$4:M$4,0))

This is the code in Column F. You can see where it uses the result in Column G to look for a value in sheets("SingleWH").

My question: Fed Income tax is dependent on what the Gross is in order to look up the tables with the Index Match function. How do I get the result of the function into column G? Can I increment up Column G and ignore the zeros that dragging the function down G creates?

View 8 Replies View Related

Formula That Counts Number Of Unique Text Values If Meets Criteria

Nov 6, 2013

I have been using this function to count the number of unique text values in a data set:

=SUM(IF(FREQUENCY(MATCH(B2:B10,B2:B10,0),MATCH(B2:B10,B2:B10,0))>0,1))

It works great if I want to count number of unique text values overall. However, I want to count the occurrences of unique text values if they meet specific criteria. (Like a countifs function would if it could count unique text).

View 7 Replies View Related

Various Lookups And Counts: Count The Number Of Days An Item Has Been Out With One Of The Companies Per Month

Oct 8, 2009

I have three companies in column A, In Column B I have a date of when an item was sent to them, in Column C I have the amount of days this item has been out with that company. Is there a formula that will count the number of days an item has been out with one of the companies per month, and find an average if more than 1 item has been sent per month. Two items have been sent to company A in Sep 09, one item has been there 10 days the other 20 days, the answer I would be looking for is 15.

View 4 Replies View Related

Function Works In VBA But Does Not Work Inside Worksheets

Jun 21, 2008

i have written a code in VBA to interpolate the value of Y0 corresponding to X0 using a set of (X,Y) points. (I have written this in module1) . This function works when i call it through a Sub or another Function in VBA. but it does not work when I try to use it as a function in my excel worksheets (when I type : =interpolate(A1:A10,B1:B10,30) .... 30 is an arbitrary value). in this case I get #value! error

The function is known in within the worksheets because when I start typing its name, the Auto Name Complete feature of excel, finds this function.

I am new to VAB for excel. Please give me a hint to see my mistakes of if something is missing inside my code.

PHP
Public Function Interpolate(ByRef X() As Double, ByRef Y() As Double, ByRef X0 As Double) As Double    Dim I As Integer, Slope As Double, NData As Integer        NData = UBound(X)    For I = 1 To UBound(X) - 1        If (X(I) = X0) Then            Interpolate = Y(I)            Exit Function        ElseIf (X0 < ListMax(X(I), X(I + 1)) And X0 > ListMin(X(I), X(I + 1))) Then            Slope = (Y(I) - Y(I + 1)) / (X(I) - X(I + 1))            Interpolate = Y(I + 1) + Slope * (X0 - X(I + 1))            Exit Function        End If    Next I        End FunctionPublic Function ListMax(ParamArray ListItems() As Variant)        Dim I As Integer        ListMax = ListItems(0)        For I = 0 To UBound(ListItems())            If ListItems(I) > ListMax Then ListMax = ListItems(I)        Next IEnd FunctionPublic Function ListMin(ParamArray ListItems() As Variant)        Dim I As Integer        ListMin = ListItems(0)        For I = 0 To UBound(ListItems())            If ListItems(I) < ListMin Then ListMin = ListItems(I)        Next IEnd Function 

View 10 Replies View Related

Countif Function In A Macro: SUM And COUNTA Works

Jan 27, 2009

I'm using the SUM, COUNTA and COUNTIF functions in a macro. The SUM and COUNTA works but the COUNTIF function does not return results.

Sub B_Test()
Dim myRange
Dim Results
Dim Run As Long
myRange = Workbooks(1).Worksheets("Master").Range("S6", Range("S6").End(xlDown))
Range("M3") = Application.WorksheetFunction.Sum(myRange)
myRange = Workbooks(1).Worksheets("Master").Range("D6", Range("D6").End(xlDown))
Range("D3") = Application.WorksheetFunction.CountA(myRange)
End Sub

I have tried countless ways to rewrite the COUNTIF line with no results or compiler errors returned. Originally had problems with the SUM and COUNTIF function and found that column formating was the problem. After clearing all column formats, the SUM function promptly began working but the COUNTIF keeps eluding all my efforts. The column which the COUNTIF is pointed to contains values of 0 to 500. Only values greater than 0 are to be counted.

View 2 Replies View Related







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