Maven4Champ
Board Regular
- Joined
- Jun 10, 2004
- Messages
- 57
Ok I am attempting to use an If fucntion similar to this
=IF(Cell<=0.29167, Cell+.5, Cell)
where as 0.29167 equals 7AM and the .5 changes from AM to PM.
Here is how the data appears in the spreadsheet
Time From: Time To:
11:00AM 11:30AM
11:30AM 12:00PM
12:00PM 12:30PM
12:30PM 1:00PM
1:00AM 1:30PM
1:30AM 2:00PM
2:00AM 2:30PM
2:30AM 3:00PM
3:00AM 3:30PM
3:30AM 4:00PM
4:00AM 4:30PM
4:30AM 5:00PM
5:00AM 5:30PM
5:30AM 6:00PM
6:00AM 6:30PM
6:30AM 7:00PM
7:00AM 7:30PM
Here is my problem. In the 'Time From' field, the times actually show up as AM starting at 1:00. So 1:00-7:00, or later if the report actualy needed, all show as AM value instead of PM value. Now what the above function would do is change anything with an equal or greater value of 0.29167(7:00:00AM) to PM by adding .5.
Here is my problem - some reports will contain 7:00AM purposely (i.e. the report time is from 7am-4pm), in which case this function I assume would also change the starting report time of 7am to a pm value as well - correct?
I believe I need the function to basically do the following:
If 'Time From' is greater or equal than 0.29167(7:00:00am) and 'Time To' has a value of PM, then add .5
Is something like that possible?
=IF(Cell<=0.29167, Cell+.5, Cell)
where as 0.29167 equals 7AM and the .5 changes from AM to PM.
Here is how the data appears in the spreadsheet
Time From: Time To:
11:00AM 11:30AM
11:30AM 12:00PM
12:00PM 12:30PM
12:30PM 1:00PM
1:00AM 1:30PM
1:30AM 2:00PM
2:00AM 2:30PM
2:30AM 3:00PM
3:00AM 3:30PM
3:30AM 4:00PM
4:00AM 4:30PM
4:30AM 5:00PM
5:00AM 5:30PM
5:30AM 6:00PM
6:00AM 6:30PM
6:30AM 7:00PM
7:00AM 7:30PM
Here is my problem. In the 'Time From' field, the times actually show up as AM starting at 1:00. So 1:00-7:00, or later if the report actualy needed, all show as AM value instead of PM value. Now what the above function would do is change anything with an equal or greater value of 0.29167(7:00:00AM) to PM by adding .5.
Here is my problem - some reports will contain 7:00AM purposely (i.e. the report time is from 7am-4pm), in which case this function I assume would also change the starting report time of 7am to a pm value as well - correct?
I believe I need the function to basically do the following:
If 'Time From' is greater or equal than 0.29167(7:00:00am) and 'Time To' has a value of PM, then add .5
Is something like that possible?