Return Value When Another Value Is Present And If Value Is In Correct Date And Time
Apr 11, 2012
I have done a VBA course but am struggling to apply it to my situation. What I want to do is on one spreadsheet, I have a column with "shift, date, grade 1, grade 3, quarantine" in it, and in the cells next to it I want an operator to enter either "day" or "night" next to shift, and the date. Next to the others I want the total weight of the appropriate product made in that time. The spreadsheet I will be feeding off is quite big with a lot of information in it. Down the left hand side is the roll number (we make rollstock). Further along on that same row will be the date, the weight, and a grading (putting it into grade 1, 3, quarantine etc). Our shifts run from 7am to 6:59pm, and 7pm to 6:59am. Which shift the roll comes under is determined by it's end time (also in that row). So basically, I need VBA to say sum up all of column [weights] if column [date] = [date cell in working spreadsheet] and if working spreadsheet says day then column [roll end time] =7:00-18:59 and if working spreadsheet says night then column [roll end time] =19:00-6:59 and also if column [grade] = [grade cell in working spreadsheet] ....
Oh, also on the feed spreadsheet i have a column that i put in a little code date, "AP04" for 4th of april kind of thing, rolls being made before 6:59am on the 5th of april being put into the 5th april as they need to be counted under 4th april as they are 4th april night shift (even though the date will stay 5th april)...
View 3 Replies
ADVERTISEMENT
Jun 27, 2008
I am wanting to calculate total time in days, months and years from a date to present. What is the best formula and how do I format the cell to display, days, months and years from a date format like dd/mmm/yyyy?
View 9 Replies
View Related
Jan 6, 2014
i am trying to find the time difference between two cells and present the date in a third cell. The data in the cells are in a non standard date/time and i need to create a special format i think. The cells look like this.
fldcollected fldaccepted Type Time between being received by database and eccepted
2013-11-06 15:59:29.1002013-11-07 08:41:12.000PSTN
View 3 Replies
View Related
Aug 13, 2009
ROW 1 - list of headings
ROW 2 - blank cells that may contain an "X"
At the end of Row 2 I want it to find out which is the last column with an "X" in it, i.e. F2, and return the title of that column, i.e. F1.
View 13 Replies
View Related
Oct 31, 2008
I am trying to add/subtract dates and times to return one sum; but I only want to count the work week (5 days M-F) and work day (8 hrs.) 8am- 4pm. This is to compute the actual turn around time for a certain process.
i.e.:
Date ReceivedTime ReceivedDate ApprovedTime Approved10/1/20081:00 PM10/15/20089:00 AM
The total hours this process should equate to is: 9days and 6hours.
way to achieve this sum?
View 9 Replies
View Related
May 28, 2008
Is there a way I can return a column heading(s) if text is present in a row?
Refer the attachment... ozgrid.xls
Names are listed down the left, headings along the top, with data in the corresponding cells. For each unique name i.e 'Steven' is there a way to list each heading data is found i.e 'Shop2, Shop4'???
View 5 Replies
View Related
May 13, 2009
Column A consists of cells with a variety of five digit numbers. My formula needs to return a text value if numbers are present in column A, this is what I tried:
=if(A1="","Chassis") but it returns "False" instead of "Chassis".
View 9 Replies
View Related
May 28, 2008
is there a way I can return a column heading(s) if text is present in a row?
refer the attachment...
names are listed down the left, headings along the top, with data in the corresponding cells. For each unique name i.e 'Steven' is there a way to list each heading data is found i.e 'Shop2, Shop4'?
View 4 Replies
View Related
Aug 4, 2009
I need to calculate the difference in Years, Months and Days between:
Date 1 = TODAY()
Date 2 = 4 years after a date in cell A1, which will always be earlier than today's date
(A bit of backround - I have certain risk management procedures that have a lifespan of 4 years. I want to calculate the time between now and 4 years after the date the procedure was completed, essentially to see how long before they have to be redone).
So far I have:
=DATEDIF(A1+4,TODAY(),"y")&"y "&DATEDIF(A1,TODAY(),"ym")&"m "&DATEDIF(A1,TODAY(),"md")&"d"
But that returns #NUM!.
Removing the +4 obviously just calculated the difference between the date in A1 and today, but I need the date in A1 PLUS 4 years and today.
I have also tried:
=(DATE(YEAR(A1)+4,MONTH(A1),DAY(A1))-TODAY())/365.25
which works in theory, however:
a) no consideration for leap years
b) does not return nY, nM, nD - only the decimal.
However I would be happy to use this method if I could convert it to Years Months Days.
View 11 Replies
View Related
Dec 5, 2013
I have two lists, one that is 99,000 lines and the other is 150. I am trying to find out where the word(s) in the list of 150 is present in the list 99,000.
1st list of 99,000 is in Sheet1 A1-A99000 and the second list is in Sheet2 B1-B150.
The caveat is that in column A there is additional words in that cell so you can not do a simple vlookup, because there may or may not be an exact match.
I have been stuck for hours and the best i can get is to use the match function but it is not working because it is not exact. Last thing i want to do is use the CTRL F key to lookup all the words.
View 2 Replies
View Related
Aug 25, 2009
I have a formula that I use to tally data and return the number of times a particular value is present in column C.
IF(COUNTIF($C$2:C2,C2)=1,SUMIF(C:C,C2,E:E),"")
I copy this formula down the sheet until arriving at the last input in column "C".
Can someone tell me how to write this in code. All I would like visible in Column "F" is the output not the formula.
View 9 Replies
View Related
Jul 25, 2014
I have a row of cells, and some of which are displaying time, but in an incorrect format.
for example 15:20 is showing in a cell as 3.2
How can I create a new cells that basically converts 3.2 into 24 hr hh:mm ....e.g. 15:20?
If I got to use the format cells option, and hh:mm, it changes the cell to the completely wrong time (i.e 04:48) ?
p.s. I should state that "some" of the cells are kind of showing the correct time, albeit with a decimal instead of a colon, for example, cell A12 is showing 4.25
one other thing I should mention.....the times will always be PM...... so 3.2 should be 15:20, and not 03:20
View 2 Replies
View Related
Sep 11, 2009
The following code fills down column B for rows 3 to 110, regardless of the inserted "If Not IsEmply' statement. I've got formulas in Column A from row 3 to 110, but visible values in rows 3-5. I want it to fill the for the visible values only.
View 2 Replies
View Related
May 27, 2012
I have a list of dates in column A which are in order but non consecutive. I am creating a new table with all consecutive dates. I need a formula to check whether a date is in column A and then give out a number in the corresponding column to the right. I am able to use Vlookup for this but if the date is not present in the first coumn it returns an N/A response. Is there a way of returning zero if the date is not present?
View 5 Replies
View Related
Oct 19, 2009
I would like to do in the column next to it is where there is a date add 45 days, and where the cell is blank just leave the cell next to it blank.
I've have tried several methods, as below and I either get an error message or the cell doesn't return what I would expect.
=IF(C3:C13>"",45,0)
=IF(ISNUMBER(C3:C13)+45
=IF(C3:C13,0,45)
View 9 Replies
View Related
Feb 20, 2014
I have the following formula:
=IF(VLOOKUP(A10,'CORE Data 3 Month #1'!$A:$K,6,FALSE)<(VLOOKUP(A10,'CORE Data 3 Month #2'!$A:$K,6,FALSE)-((VLOOKUP(A10,'CORE Data 3 Month #2'!$A:$K,6,FALSE)*0.03))),'CORE Data 3 Month #2'!A3,IF(VLOOKUP(A10,'CORE Data 3 Month #1'!$A:$K,6,FALSE)>(VLOOKUP('CORE Data 3 Month #2'!$A:$K,6,FALSE))+((VLOOKUP(A10,'CORE Data 3 Month #2'!$A:$K,6,FALSE)*0.03)),'CORE Data 3 Month #2'!C3,'CORE Data 3 Month #2'!B3))
The strangest thing is happen. The part of formula underlined and the part bolded are identifical. For some reason, excel is unable to find the value in the underlined portion but is able to find the value in the bolded portion. As a result, I'm getting a #N/A result. how this can be corrected?
View 3 Replies
View Related
Feb 11, 2009
I need the formula for statistical data analysis for a research project i'm helping out with, and this is too complicated for me to know where to even begin searching for the information. The problem is this:
I have a sheet (called Sheet1) containing 9009 rows of information on columns A to AL. I am interested in searching for the starting sequences of codes contained in column AI and returning values on the same row but in a different column. The formula that works so far is this (note: I use Excel 2003 and a swedish version, translated the formulas though)
=IF(ISNA(MATCH("N06*";Sheet1!AI:AI;0));"error";INDIRECT(ADDRESS(MATCH("N06*";Sheet1!AI:AI;0)*1;1;1;T RUE;"Sheet1")))
I havent come up with this formula entirely on my own so dont think my expertise is this high In any case, this formula gives me the value of the A-column in the same row as the first N06 found in the AI column. If N06 isn't found anywhere in AI, it gives me "error". The problem is this: I want it to "continue" searching column AI for strings starting with N06 and returning the values in the A-column for the following N06s found. I basically want to wash out all rows of information that dont contain the string N06 in AI, and get the new information on another sheet.
To make it even clearer: I want to have all values on column A on a new sheet, but only where the AI value on the same row starts with N06. Eventually I want other columns as well, and also search for other codes, but that should be easy to figure out once I get the initial formula.
View 3 Replies
View Related
Nov 4, 2005
How can I correct this Time formula which says in the Tag that it produces a
negative Result and hence displays in cell as ####
=(INDEX($A18:$A33,MATCH(MIN(C18:C33),C18:C33,0)))-(60/1440)
What I am doing is selecting the field in A which equates to the lowest
value in C (C= hourly sales), then I am subtracting 60 mins from the value
selected in A. This in effect will give me my closing Times i.e. find the
cell with Zero Sales then subtract 1 hour to find what must be the closing
time (assuming of course that there is at least ?1 of sales per hour while
open).
My cells in A are formatted as h:mm AM/PM, as is the format in the formula
cell
View 23 Replies
View Related
Nov 22, 2008
I have a file which ask for UserId and password. If password is correct, the time stamp should be recorded on the worksheet. However I have some slight probelms on the code I am working on. can someone help me check my coding?
View 14 Replies
View Related
Feb 8, 2013
=HLOOKUP(G8,'Headline Assumptions'!$C$32:$F$37,E8,FALSE)
Above formula, in cell E8 is the number 3, however excel does not recognise this and returns 1. is there a way i can get E8 to see that it is a 3 in that cell and return the correct number of rows downwards in my table?
View 1 Replies
View Related
Apr 19, 2013
I have cells within a column that could contain both text and dates. When a date is entered - the activity is complete. I want the cell color to automatically turn green when a date is entered. Conditional formatting seems to use ranges, or today's date, or > than and < than... and I want the cell the turn green when any date is entered. I haven't been able to find either vba code or an excel formula that will work.
View 3 Replies
View Related
Apr 19, 2014
I have two tabs in a workbook named "Dashboard and Medicine details"
I need my dashboard to show what are the medicines will expiry in next month.
My Medicine details tab contails medicine details along with its expiry date. If the expiry date of a medicine falls in next month, then it should be displayed in my dashboard.
See the sample attached will give you a clear objective.
Tablet sample.xlsx
View 2 Replies
View Related
Aug 20, 2008
B. start time C. end time D. Total time (military time)
Example: 2300 - 0300 = 4 hrs worked.
=IF(C19-B19>0,C19-B19,1+C19-B19)
I have a row for every date the hors is worked.
I cant seem to get the total hours to calculate correctly at the bottom of column D for a total hours worked in a particular pay period. It calculates a total up to 24hrs then reverts to zero. I have tried [h]:mm =SUM(XX:XX) and just about everything else I can think of and cant get it to calculate a correct total over 24 hrs.
View 5 Replies
View Related
Mar 5, 2014
Column A = persons name
Column B = number of hours
Column C = trade
Column D = shift (as in day, night or weekend)
Column E = I would like the formula that looks at the trade and time and then puts the correct rate.
I have a little table on the site with trades/times and rates. IF and IF THEN do something
I took a screenshot to show: [URL] ..........
View 3 Replies
View Related
May 13, 2013
Here's the data table being referenced
Rank
Week Ending
Name
Value
1
1/1
Apple
100
[Code] ........
Now on another sheet, I want to return the top two 'Name's and their values like below:
Name
Value
There is a fluctuating amount of rows in the first table, too. So what formula can I use to return the correct names and values on another sheet?
I'm thinking it will use some form of concatenate for the first and use a sumifs function for the value column..
View 1 Replies
View Related
Jun 24, 2009
I'm trying to create a formula in cell f13 of my attached spreadsheet "Sample 1" that will search the 2nd attached spreadsheet "Sample 2" and return the correct serial number based on both the matching PO # (located in cell E10 on Sample Sheet 1 and in Column 5 on Sample Sheet 2) and Product # (cell A13 on my Sample Sheet 1). My current formula is not returning the correct result and I'm not sure why.
View 4 Replies
View Related
Jun 17, 2006
I am attempting to pick up a date with time entry on a worksheet and place it into a TextBox on a UserForm. Format on the sheet is mm/dd/yyyy h:mm AM/PM. The UserForm is placing the value as mm/dd/yyyy 12:00 AM. here is the
Private Sub UserForm_Initialize()
If Not Range("dDate").Value = "" Then
TextBox2.Value = Range("dDate").Value
TextBox2.Text = Format(DateValue(TextBox2.Text), "mm/dd/yy h:mm AM/PM")
Else
TextBox2.Value = ""
TextBox2.SetFocus
End If
End Sub
"dDate" is the named range where the date is sitting. The format is also set on the TextBox2 exit event. Can anyone see why only the date portion is being transfered with the default 12:00 AM for no time component of the value?
View 3 Replies
View Related
Feb 26, 2009
I'm currently using an IFERROR, VLOOKUP formula to display an availability date for a product.
Atm, it reads some like this
View 3 Replies
View Related
Oct 21, 2011
We have a form (an Expense Sheet) that has the date entered in the "Monday" cell using the =Today() formula (the rest of the week uses =Today()+1, =Today()+2, etc).
I am betting you already see the problem...this only works if you open the form on a Monday....before I point out the error to the document owner I thought I better have a solution...
So...what is the best way to self-populate the "Monday" cell with the correct date for the Monday of the week?
View 2 Replies
View Related
Jan 2, 2013
I have loaded a .csv file in which the first column contains date/times, e.g. 01/12/2012 00:00. How do I now tell Excel (2010) that this is in fact a date/time format? If I select one or more of the cells, click on the Number dialog box launcher and try to pick a suitable format tghe cells resolutely refuse to budge from being text (i.e. left-justified, still allows me to edit the 'seconds' component to a number > 60). Also which data type should I be using? The only one that appears to have a full date/time format listed is Custom (not Date or Time).
View 4 Replies
View Related