Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have had a look at this site, and across the net, but can't seem to solve this, which should be easy! Concatenate should work, but I wasn't able to make it work.

Current spreadsheet looks like this:

B2: 8:00 (AM) (Start time)
C2: 1:00 () (Duration)
D2: 9:00 (AM) (End time)

I would like to have a formula in A2 that looks like this: 8:00 - 9:00, and obviously updates as soon as I make changes to the B2 and C2 (D2 is already working with a formula)

share|improve this question

migrated from stackoverflow.com Mar 2 '13 at 0:21

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 2 down vote accepted

This one is working in LibreOffice, but it seems, that the TEXT function and & operator is adapted from Excel:

=TEXT(B2,"hh:mm")&"-"&TEXT(D2,"hh:mm")

share|improve this answer
    
CLOSED: Thank you, works like a charm!! –  Herman Mar 1 '13 at 9:54
=TEXT(B2,"hh:mm AM/PM")&"-"&TEXT(D2,"hh:mm AM/PM")  
=8:00 AM - 9:00 AM
share|improve this answer
1  
Can you please add some context/ explanationto your formula. –  Eric G Mar 20 at 17:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.