How To Populate Date Cell Based On The Sum Of Two Time Cells

May 12, 2014

I've attached an example workbook.

Trip Plan example.xlsx

I'm trying to work out how to have cells R11 - Rxx generate the correct date, based on the rest of the calculations.

Please note that the attached is a crude cut down version of the larger spreadsheet, for the purpose of highlighting my problem.

SO, if E7 is changed, subsequently the values in K11:Rxx will be respectively updated.

D12 and G12 are entered manually. (although I'll probably make these drop downs or date choosers at some point...)

Depending on the value in E7 and time in D12, the required break period is listed in K11: Kxx.

The time that these periods of rest are required to occur before is then calculated and listed in O11:Oxx.

I need R11:Rxx to calculated the appropriate date from these calculations, relative to the date in G12.

For example, the rest required in K11, is required on the same day, as such it need to populate with the value in G12.

However the rest required in K13:Kxx, is required by a time (O13:Oxx) on the following day - G12+1

In some case, this time variance could run over 2 or more days.

I figure it's got something to do with the value in D12 also including the date of 0/1/1900.

I'm happy to add hidden cells for formulas/results to work around it, as the end product will print as an A4 document, where many cells will be locked.
Would prefer not go with any VBA unless it's my only option as I haven't done any VBA stuff as yet.

NB (the value in P5 is static only in this example)

View 11 Replies


ADVERTISEMENT

Populate Cells Based On Date And Time Range Selection?

Mar 10, 2014

Is it possible to be able to select a range of dates, and a time interval, and then to automatically fill in cells in a column? to be more specific, I want to be able to select, say 1 Jan 2013 to 31 dec 2013 in one box, then specify a time interval, for example "hourly" and then a column is populated with each interval, i.e. 1 jan 2013 00:00, and then the next one is 1 jan 2013 01:00 etc. I have tired the normal automatic fill tool but it never seems to get it right. It works for the first few days then it all goes funny.

View 3 Replies View Related

Delete Date & Time Cells Based On Time

Dec 6, 2006

I have a large dataset where the first column is date and time i.e. "20/01/2005 03:41:06" and I want to delete certain rows based on the times. I have already tried playing about with macro's but failed fairly spectacularly so far. I have code from someone else to delete cells if the value equals a certain time but this doesn't work as the cell contains the date too.

I have already recorded one macro to reformat the data to as the software return 10 timestamped samples per hour and I want 8 i.e. every three hours so there is constant separation for statistical purposes. Both the macros are shown below so you can see what I have.

Ideally I would like to replace the line - If (r.Cells(n, 1) = TimeValue("22:41:06")) ............ - with one that reads - If (r.Cells(n, 1) CONTAINS TimeValue........ - but I don't know if that is possible? If not is there a way to separate the time from the date into 2 columns and then I can delete rows based on the time column using the code below? .......

View 9 Replies View Related

Populate Cells Based On Value Of Another Cell?

Apr 6, 2013

I have a table in excel with some data to create labels, but these labels must be repeated according to the number of volumes. Example: I have a delivery for X and such delivery has 5 volumes, need to create 5 labels just changing the volume number: 1/5, 2/5, 3/5, 4​​/5 5/5.

I would enter a value in "D1" after running the code, in column "A" shall be filled as follows.

D1 = 7
A2 = 1/7
A2 = 2/7
A2 = 3/7
A2 = 4/7
A2 = 5/7
A2 = 6/7
A2 = 7/7
If "D1" equals 3 then
A2 = 1/3
A2 = 2/3
A2 = 3/3

View 4 Replies View Related

Populate A Cell Based On Conditions Of Other Cells W/out Putting A Formula In The Cell

Oct 10, 2009

Is there a way to make a cell populate certain text based on conditions of other cells without putting the formula in the cell you want to populate. So that someone could type other text into the cell if the conditions were not met?

View 14 Replies View Related

Excel 2007 :: Auto-populate Cells Based On Value In Another Cell?

Nov 29, 2010

I'm creating a configuration tool for instrumentation that has several options. Many of these options are dependent on one another. To summarize, I need to:

*Conditionally lock cells (and populate with "N/A") OR allow selection from drop down list - the list exists, it's the locking and auto-population I'm struggling with

Example: If A1 = No, then B1 = "N/A" and is locked, else allow selection from drop down list in B1

View 3 Replies View Related

Macro To Populate Cells With Formula Based On Adjacent Cell?

Mar 31, 2014

I have a spreadsheet with data populated down column B. This size will vary from day to day so is there a macro I can run that will populate Column C with a formula based on their being data in the adjacent cell.

View 2 Replies View Related

Pull Date & Times Into Seperate Cells From Date & Time Cell

Apr 2, 2008

DONNAS [Single cell, 1st row] 09/08/2003 15:34 [Single cell ( date and time combined) 2nd row]. Do you know of any way that I can move the name, date and time from the above cells to three separate columns on the same row?

View 4 Replies View Related

Populate A Specific Range Of Cells Based On A Value Of Any Kind In A Header Cell

Sep 22, 2009

I need to populated a specific range of cells based on a value of any kind in a header cell. Attached is a sample of the end results. Please remember each header cells needs to determine what happens the range of cells below the header cells.

View 3 Replies View Related

How To Populate Static Date And Time Using Formula

Nov 29, 2012

what type of vba code I could use to populate a static date and time that I could plug into a formula. Basically what I need is:

IF A1<>"" then L1 shows the date and time of the entry. If A1="" then L1 remains blank. I don't want the date to change once it has been entered.

View 7 Replies View Related

Date And Time Based On Shift In Cell

Jan 8, 2009

If I use =now() in a cell it will enter the current date and time. For shift workers, this does not work.

I'm tring to figure out a formula that will only change the date at 6:00am every day. This way a person working the night shift will not see a change in the date on his sheet at all, only the day worker.

View 5 Replies View Related

Add X Days To Date Based On Time In Another Cell

Apr 23, 2008

I have a date in col A and a time in col B. I'm trying to use an if function so that if time in Col B is greater than 15:30, the date in col A is returned plus one day. If time in col B is less than 15:30, date in col A returned with no change.

View 4 Replies View Related

Macro To Auto-populate Date And Time In Text Format

Jun 7, 2012

I think there's a way to use Excel to automatically create a 5-day calendar. Maybe a macro?

The date format must be dd/mm/yyyy hh:mm and it must be in text format. If its June 9, 2012 at 6pm - the correct format is: 12/06/2012 18:00

I want to post 5 times a day: 09:05, 9:55, 10:45, 16:55 and 18:00.

Column A is where the date and time goes. Ideally, I'd enter in A1 the start date and then run a macro that would automatically populate the next 5 consecutive days with the specific times above (so 25 rows total in column A).

I have to save the file as a csv file, so the date and time format has to be in text or I'll get an upload error in Hootsuite.

View 1 Replies View Related

Auto Populate Current Date And Time On Making Entry

Sep 18, 2013

I am trying to get excel to auto populate the current date and time each time I make an entry, however, each time i make an additional entry the current date and time populates but it changes all the prior entry's with that current date and time.I am trying to keep a log of all the times I make a new entry. Correct formula that will work?

View 9 Replies View Related

Show Current Date Or Yersterdays Based On Time In Cell

Mar 19, 2009

I am trying to write a formula that will have the cell display todays date if it is after 2:00PM, and if it is before 2:00PM I need the cell to display Today()-1. I have tried several iterations and I'm stumped.

View 5 Replies View Related

Date/time Macro: Inserts The Current Date And Time In The Selected Cell Regardless Of Where That Cell Is

Oct 20, 2009

What is the code i need to use to assign a macro to a command button which inserts the current date and time in the selected cell regardless of where that cell is?

View 5 Replies View Related

Move Latest Updated Cell In Sheets In A Workbook Based On Time And Date

Mar 1, 2014

I am having rows of data, that i will be updating from time to time. I want excel to move the latest updated rows, in any column if updated, to move to the top, to easiy know that i updated those records. It should be that when i updated more rows than one, then the first updated cell would be in lower, in order, than the latest updated cells. I do not want any cumbersome vba. I want in formula or in conditional formatting. The row no may be total not limited to some rows.

Because, you naturally would have updated the 200 th record and would have saved. It saved as it is, so when you next opens it it is there, but how can i know that that is the last row of data i edited.

View 5 Replies View Related

Find Time Difference Between Two Cells And Present The Date In Third Cell?

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

Code To Update Cell With Current Date And Time When Other Cells Are Modified

Mar 11, 2014

I needed a code that would input the current date and time in the cells in column N whenever changes were made to any cells in the row from columns A to M. For example, if I change a name in cell 6D, then cell 6N would automatically change to the current date and time.

I found a useful code on a forum (maybe here, don't know for certain) and modified it to suit my needs (see below). I am however now getting a debugging error suggesting that the second line that reads "Private Sub Worksheet_Calculate()" is causing an error.

View 11 Replies View Related

Populate List Of Months Based On Date & #

Jul 15, 2009

I have a # of months in P11, and a Start Date in P12:

P119 Months126/1/2024

I need to excel to autopopulate monthly dates from the Start Date = to the # of months displayed in P11: ...

View 17 Replies View Related

Lookup Sunset Time Based Onrecord Date - Incorrect Time Calculated

Mar 22, 2012

Consider this code:

'light eligibility
Dim facb As String
Dim sunset As Variant
[color=green]' check if facility has lights[color]
facb = WorksheetFunction.VLookup(RID, ds, 10, False) 'find facility code
If WorksheetFunction.VLookup(facb, fac, 6, False) = "Y" Then 'facility has lights
sunset = WorksheetFunction.VLookup(tempws.Range("A9"), sun, 2, False) 'lookup the sunset time based on the record's date

[Code] ......

This code checks the need for lights at a facility.

It first checks to see if the facility even has lights by cross-referencing a value in the record with a facilities database.

If it has lights, it then checks to see if they are needed. If the rental goes past the sunset time, then it needs lights. Sunset is determined by cross-referencing the date value in sheet1! A9, with the sunset database.

If it needs lights, variable lghtson is calculated equal to "sunset"-30 minutes.

As I step through this code:

WorksheetFunction.VLookup(facb, fac, 6, False) = "Y" Facility has lights.
Check to see if lights are needed.
sunset = WorksheetFunction.VLookup(tempws.Range("A9"), sun, 2, False)
sunset=0.879166666666667 which is 9:06PM. This is a proper value from the lookup.
If rental_end.value > sunset Then
rental_end (value from textbox) = "9:30 pm" , sunset=0.879166666666667. This is true, and Excel accepts it as true ...
lghtson = sunset - 0.5
0.379166666666667 = 0.879166666666667 - 0.5 (9:06 AM)

This is not the value I was looking for. I was looking for 8:34PM (0.856944444444444)

View 2 Replies View Related

Lookup Range Of Cells And Populate Specific Cells Based On Matching Data?

May 23, 2014

I am trying to build a staff roster. The staff rotate over a 4 week cycle. the name of the staff member, and their shift needs to be looked up from the key then matched with the particular week. the name and shift then need to populate specific cells.

I have attached the worksheet so you can see what i am trying to achieve.

View 2 Replies View Related

VBA Code Or Formula To Have Reports Populate Based On Date Picked?

Aug 2, 2013

I have this concept of a table of responses that have to be generated every month or on command. These reports export from a website into a certain format, its easy for me to adjust it so it can populate a the table. Although, i want to incorparate my date picker so everytime i pick a certain date a diffrent set of data will populate from the report. it seems very possible, just need to know where to go from. Either a VBA code or a fomula to allow for this to happen.

Heres and example..(cell linked to date picker)........column1 column2 column3,(date picker from microsoft),,each has a corresponding month

.....................................................................jan
.....................................................................feb
.....................................................................etc.

say i pick january, i want these columns to give me my data from a sheet or other workbook(the january report). i want everything linked so it will do this for virtually every month of the year. ive attached an example, the only thing i can think of is to make the cell that changes with when i pick a date to link to the report criteria.

View 1 Replies View Related

Auto Populate Excel Calendar Based On Date Ranges

Dec 4, 2013

I am trying to have the calendar in the second tab of the attached excel file to auto populate based on info in the first tab.

In the first tab, there is the start and end dates of certain projects. The calendar will need to only show the project name of every project being worked on that specific day.

Some days will have more than one project being worked on, the Calendar will just need to list them all under that day. The Start and End dates count as days the project being worked on as well. We will also need the calendar to auto update whenever we modify the dates in the first tab or add/remove projects (rows).

View 5 Replies View Related

Populate Cell With Current Time When Specified Range Changes

Jun 2, 2007

i have this excel sheet that am using as a monitoring device to track the login and log out patterns of a group of 20 agents. i am able to monitor their current state by using an external link to the local intranet and vlookup.

the status of agent can be either Logged In or Logged Out which populates in E6 to E25.
the cells f6 to f25 again running vlookup shows the last login time of the agent.

what i'm looking for is this:
every time the agent status changes from Logged In to Logged Out or visaversa, the corresponding blank cell in the row needs to populate the the time by value.

View 9 Replies View Related

Automate Cells To Populate With Today's Date

Nov 5, 2007

I'm in the process of creating a budgeting spreadsheet for monthly expenses. I have one column (D) as "Paid" and column (F) as "Date Paid". Is there a formula that can automatically insert today's date of entry into the "Date Paid" column, once the "Paid" column has been filled in with an amount?

For example: I enter $20 in the "Paid" column, then the "Date Paid" column is self populated with that particular days date. I would like to do this for every sheet.

View 9 Replies View Related

Date Cells In Project Plan To Change Based On Other Cells Including Other Date Cells

Oct 31, 2008

This is a project plan with tasks and dates. Column A is the activity number. (Example 1, 2, 3" etc). Column B is the task (Ex. "Complete Report"). Column C is number of days required to complete the task. Column D is the dependency column. (Ex. Cell D2 =1 in other words Task 2 is dependent on task 1). Column E is the date.

I would like to have a seperate start date cell and a go live date cell.

The objective is to enter a start date, and have each column E date increase based on the number of days entered in Column C. If a task is dependent on another and I change the number of days in Column C I need the dependent task to change the same amount of days.

View 9 Replies View Related

Coloring Cell Based Off Of Other Cells Date

May 21, 2008

I am trying to make a certain cell range turn red on the week that a cell has listed.

What this is being used for is to track the work of our contractors, and I currently have this set up to auto calculate the jobs that are being done and when, but I would also like to include something in there that when the contractor is set to head back to India, that day forward is listed as "red" under his name. This will allow me to see if I need to extend his work based on the number of hours he has left in his jobs. I will attach the picture of it...on the top you will see dates, and the pivot table on the bottom shows when he will need new work, but I am going to add a field that has the date he is set to leave, this is what I want the coloring of fields to go off of! ...

View 9 Replies View Related

Auto-Populate Cells Based On Dropdown?

May 27, 2014

The file is attached here. I would like to be able to autopopulate cells based on a dropdown. The first tab has the final report and the other 2 tabs are the raw files.

KMPH_Inventory.xlsx‎

View 1 Replies View Related

VBA To Populate To Specific Cells Based On Criteria

Jul 6, 2014

I am looking for a VBA that could populate from column (A2:A5) to cells (B2:F5) as in the attached spreadsheet, based on the frequency, in a five year time-frame.

screen_print.JPG

[Code] .....

View 1 Replies View Related







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