Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-25-2011, 12:49 PM
flackend flackend is offline Automatic, Dependent Cell Values Windows XP Automatic, Dependent Cell Values Office 2003
Novice
Automatic, Dependent Cell Values
 
Join Date: Aug 2011
Posts: 6
flackend is on a distinguished road
Question Automatic, Dependent Cell Values

I have a spreadsheet that has an event start time in column A and the end time in column B.

I have it set it up so when the start time is filled in, the end time is automatically populated with the start time + two hours.

This formula is in each cell:

Code:
=IF(A1 <> "", A1 + TIME(2,0,0), "")
So the user set the start time as 5:30 PM and the end time is automatically 7:30 PM.

I also want the user to be able to set a custom end time. But if the user does, they have to erase the formula so it won't be there for the next semester of events.



I'm not sure if there is some form of data validation I can do? I could do brute-force dependent drop-down lists, setting one for every 5-minute interval, haha.
Reply With Quote
  #2  
Old 08-26-2011, 03:45 AM
Catalin.B Catalin.B is offline Automatic, Dependent Cell Values Windows Vista Automatic, Dependent Cell Values Office 2007
Expert
 
Join Date: May 2011
Location: Iaşi, România
Posts: 386
Catalin.B is on a distinguished road
Default

a simple idea is to set a blank column for users to enter extra time if needed, and complete the formula with this column
=IF(A1 <> "", A1 + TIME(2,0,0), "")
=IF(A1 <> "", A1 + B1 + TIME(2,0,0), "")
Reply With Quote
  #3  
Old 08-26-2011, 07:01 AM
flackend flackend is offline Automatic, Dependent Cell Values Windows XP Automatic, Dependent Cell Values Office 2003
Novice
Automatic, Dependent Cell Values
 
Join Date: Aug 2011
Posts: 6
flackend is on a distinguished road
Default

I created another column, column C, with the start time + two hours formula:

Code:
=IF(A1 <> "", A1 + TIME(2,0,0), "")
Then I hid the column. Then set the data validation (list) for the end time column (column B) to this formula:

Code:
=OFFSET(INDIRECT(ADDRESS(ROW(), COLUMN())),0,1,1,1)
Which gives a drop-down list that contains only the contents of the cell one column to the right (which contains the start time + two hours).
Reply With Quote
Reply

Tags
data validation



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dependent drop down lists in Word 2007 benbenasc Word VBA 0 08-24-2011 06:34 AM
Automatic, Dependent Cell Values How to count multiple values in a single cell, except zero? iuliandonici Excel 1 04-13-2011 09:45 PM
Automatic, Dependent Cell Values Sum & difference between multiple values in a single cell iuliandonici Excel 4 04-13-2011 09:27 PM
Auto-populate an MS Word table cell with text from a diff cell? dreamrthts Word Tables 0 03-20-2009 01:49 PM
How to create a Dependent Drop-Down Picklist ComcoDG Word 2 03-17-2009 07:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft