On Monday September 17 2007 08:38 am, Sudheer Satyanarayana wrote:
> Hi,
>
> I have a spreadsheet with two columns. Column A contains the start time
> and column B contains the end time. I enter data into these columns in
> the format hh:mm. In column C I would like to calculate the difference
> of column B and column A in minutes or hours.  I'm using this
> spreadsheet for office productivity.
>
> How can I achieve this?

    Click the top of column C to highlight the entire column. Right click 
on the "C" at the top of the column and select Format Cells from the 
context menu. This opens the Format Cells window. Make sure the Numbers 
tab is selected. (If not click on it.) Under Category select time. Under 
Format, select the top item:   13:37. Near the bottom you should see HH:MM 
in the Format Code box. This will give you the difference between the 
start and finish times upto 23 hours and 59 seconds. If any of these times 
need to be 24 hours or more, you need to modify the Format Code. Simply 
add [] around the HH so that you have [HH]:MM. Then click the green check 
mark at the right end of the Format Code box. Then click OK. This is the 
formatting part.
    For the calculation: in Cell C1 enter this formula:
= B1-A1
 and <Enter>. (Use the Enter key to enter the formula in that cell.) Use 
the mouse to click cell C1 again. There will be a handle at the bottom 
right corner of cell C1. (It looks like a very small square.) Move the 
cursor over that handle, and the cursor turns to a +. While the cursor is 
a +, drag the handle down as many rows as you want. It will add the 
correct formula to each of the cells that you have selected by dragging 
the cursor.

Dan  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to