Hi,
I have in cell A1 date and time value (6/09/09 10:15)
Now I want to calculate the value of cell A2 taking only time value only (10:15) from A1, using IF. How can I write syntax asking to look only the time value not date? If time = 10:15, A1=1.33, 1.65 Is it possible? I tried it gives me #Value! error. Appreciate your help.
Thank you
Jaz
Last edited by jazbath; 06-10-2009 at 01:59 PM.
To get the time only
=MOD(A1,1)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thank you DonkeyOte, it gives me time value but I like to add 1.3 time value to this for A2.
Jaz
Jaz, I'm afraid I'm struggling to understand your wants... could you provide a few examples ?
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
DonkeyOte,
I am attaching an example sheet, hope this would explain better.
Thank you for your time.
Jaz
Can you clarify as to what the 1.3 etc represents ? is 1.3 meant to be 1 and a 1/3 day - ie 30 hours or 1 and 1/3 hours ie 80 minutes ?
Also not clear if you want to add 1.3 to the datetime value in A1 or just the Time ? Assuming you mean to add 1.3 days to A1 if the time in A1 is 16:30 then:
A2: =A1+IF(MOD(A1,1)=0+"16:30",1.33,1.65)
Last edited by DonkeyOte; 06-10-2009 at 02:44 AM.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Hi DonkeyOte,
1.3 is the time value which is equal to about 32 hrs. Actually it is 1.3 days.
I am adding time to that value in A1. That works perfectly, all it does is add add 1.3 days to A1 date/time value and put in A2 changing both date and time accordingly.
thank you
Jaz
Last edited by jazbath; 06-10-2009 at 01:59 PM.
The formula provided should then do what you want (adjust the 1.33 to 1.3 etc as required)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks