473,385 Members | 1,465 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Merging Two Cells Contents Into One

Hello:

What I'm dealing with is time. I have created a spreadsheet, thanks to the help of the folks here, to to calculate hours worked.

It works like such:
A1 (Start Time) A2 (End Time) A3 (Total Time Worked [A2-A1]) A4 (=IF(A3>5.5,A3-0.5,A3))

Well now I'm having to provide the start and end times in the same cell for the purpose of payroll.

So what I need to find a way to do is take A1 and A2 and Merge them in say A5.

Basically I need to have 0800-1600 in a cell on it's own.

This would require to merge the contents of the two cells plus it would require removing the : in the time cells.

Is this even possible?

Please Help!
Thanks.
Oct 1 '07 #1
4 1458
Okay so in my reserach I have found this formula to add the :, so I just need help to reverse it and remove it.

http://www.exceltip.com/images/screenshots/99.gif

The formula there is:

=IF(A3<1000,TIMEVALUE(LEFT(A3,1)&":"&RIGHT(A3,2)), TIMEVALUE(LEFT(A3,2)&":"&RIGHT(A3,2)))

Thanks
Oct 1 '07 #2
Okay so I've begun to figure out the LEFT and RIGHT and MID options. However I am for some reason not able to get them to work. When I try to pull the first two digits i'm now getting a strange decimal.

A1 A2
16:00 =LEFT(A1,2) [I get 0.]

Am I doing something wrong?
Oct 1 '07 #3
Try this:

Expand|Select|Wrap|Line Numbers
  1. =TEXT(A1,"hhmm") & "-" & TEXT(B1,"hhmm")
Where A1 is the start time and B1 is the end time.
Oct 1 '07 #4
Thanks, that did the trick.
Oct 2 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Klatuu | last post by:
Whew, I've struggled my way through figuring out how to use XML to transport data..now I can imagine what having a baby is like :) But, I'm stuck now. I generate the XML (single table, no...
31
by: Royal Denning | last post by:
I am designing a table with 2 columns and 20 rows. I want to insert small images (each with a link) and a text title in each cell of the table. On refresh of the page, I would like to have the...
3
by: Damian Arntzen | last post by:
I'm a beginner to moderate programmer who's fiddling around with automating Excel, in particular after being able to have the user fill out a form and it then generate the workbook. I can't quite...
2
by: Chris Bellini | last post by:
Greetings! I'm developing a C# application that needs to read some data from a selected XLS file. I've used VB in the past to automate Excel but this is the first time I've used C#. Back in VB,...
3
by: Robot | last post by:
Dear all, I need to create a script which will extract the contents of 2 cells of an html that contains a specified number of cells.Then I need to put that contents in another cells of my own html...
7
by: Rich_C | last post by:
I'm able to clone a table row using this: function insert(btn) {var cell, newRow, row, sect; if((cell = btn.parentNode) && (row = cell.parentNode) && row.cloneNode && (sect = row.parentNode) &&...
1
by: samn | last post by:
I wrote the following script in order to traverse an HTML table and merge the cells that have the same value across multiple rows. For some reason, however, it works for the first, third, and...
3
by: patl | last post by:
Hi all, I am trying to write a terminal emulator using Javascript + AJAX and I need to create an 80x25 table (each cell contains 1 character) in which I can update the contents of each cell...
0
by: =?Utf-8?B?RmxvcmlhbiBLb3dhbHNreQ==?= | last post by:
Hello. I have a simple question. Is it possible to merge some cells in the DataGridView??? I would need to merge 2 cells sometimes in a DGV.. Thanks
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.