ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding Time from Name Range (https://www.excelbanter.com/excel-discussion-misc-queries/222565-adding-time-name-range.html)

Cathy

Adding Time from Name Range
 
=F9+VLOOKUP(A9,time,2,FALSE)

In the formula above in cell H9 it is supposed to look at the time in cell
F9 and look at cell A9 and if A9 for example is Green in the name range are
Green represents 1.5 hours, then it will add 1.5 hours to F9 and give me that
in cell H9.

For Example
F9 currently read 9:00 am. So since Green is in cell A9 and Green is equal
to 1.5 hours long, then the formula should come back with 10:30 am. However,
it is not. So I am assuming that the reference in my named range area is
incorrect. Here is my name range area -

Red 1 (Should add 1 hour)
Purple 1.25 (Should add 1 hour & 15 mintues)
Green 1.5 (Should add 1-1/2 hours)
Brown 1.75 (Shoud add 1 hour and 45 minutes)
Yellow 2 (Should add 2 hours)

What is currently happening is I have 9:00 am and I am getting a returned
value of 9:00 am..

HELP .. and Thank you in advance

Luke M

Adding Time from Name Range
 
You are adding integers and time! In XL, time is actually a decimal number.
For example, 2 = 1/2/1900 12:00 AM

In your table, input the time you want to add as time (e.g. 1:00, 1:15,
1:30, 1:45, 2:00)
XL will automatically recognize these as time values, convert to decimal,
add it to your other time value in F9, and display the result (again, in time
format).
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Cathy" wrote:

=F9+VLOOKUP(A9,time,2,FALSE)

In the formula above in cell H9 it is supposed to look at the time in cell
F9 and look at cell A9 and if A9 for example is Green in the name range are
Green represents 1.5 hours, then it will add 1.5 hours to F9 and give me that
in cell H9.

For Example
F9 currently read 9:00 am. So since Green is in cell A9 and Green is equal
to 1.5 hours long, then the formula should come back with 10:30 am. However,
it is not. So I am assuming that the reference in my named range area is
incorrect. Here is my name range area -

Red 1 (Should add 1 hour)
Purple 1.25 (Should add 1 hour & 15 mintues)
Green 1.5 (Should add 1-1/2 hours)
Brown 1.75 (Shoud add 1 hour and 45 minutes)
Yellow 2 (Should add 2 hours)

What is currently happening is I have 9:00 am and I am getting a returned
value of 9:00 am..

HELP .. and Thank you in advance


Cathy

Adding Time from Name Range
 
THANK YOU .. I knew I had to be doing something wrong.

"Luke M" wrote:

You are adding integers and time! In XL, time is actually a decimal number.
For example, 2 = 1/2/1900 12:00 AM

In your table, input the time you want to add as time (e.g. 1:00, 1:15,
1:30, 1:45, 2:00)
XL will automatically recognize these as time values, convert to decimal,
add it to your other time value in F9, and display the result (again, in time
format).
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Cathy" wrote:

=F9+VLOOKUP(A9,time,2,FALSE)

In the formula above in cell H9 it is supposed to look at the time in cell
F9 and look at cell A9 and if A9 for example is Green in the name range are
Green represents 1.5 hours, then it will add 1.5 hours to F9 and give me that
in cell H9.

For Example
F9 currently read 9:00 am. So since Green is in cell A9 and Green is equal
to 1.5 hours long, then the formula should come back with 10:30 am. However,
it is not. So I am assuming that the reference in my named range area is
incorrect. Here is my name range area -

Red 1 (Should add 1 hour)
Purple 1.25 (Should add 1 hour & 15 mintues)
Green 1.5 (Should add 1-1/2 hours)
Brown 1.75 (Shoud add 1 hour and 45 minutes)
Yellow 2 (Should add 2 hours)

What is currently happening is I have 9:00 am and I am getting a returned
value of 9:00 am..

HELP .. and Thank you in advance



All times are GMT +1. The time now is 06:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com