Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Maybe you could use a little macro to fix those text values.
Option Explicit Sub testme() Dim myCell As Range Dim myRng As Range Set myRng = Selection For Each myCell In myRng.Cells If myCell.Value Like "-##:##" _ Or myCell.Value Like "-#:##" Then With myCell .NumberFormat = "hh:mm" .Formula = "=-""" & Mid(myCell.Value, 2) & """" End With End If Next myCell End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Just select the range to adjust and run the macro. SamGB wrote: I need to import data from another application (RM airline managment) which i do using the .csv file. It imports fine, but the data shows the departure times for aircraft in 0:00 format, which excel sees as h:mm. The problem i have is when an aircraft departs early the figure is -0:03. The data i have is a mixture of positive times (0:07) and negative times (-0:03) when i use the count function it doesnt count any negative times only the positive, unless i put in "" around the time (-"0:03") and using the 1904 date system. Any ideas on solutions? #was thinking if there is away of using the replace function to find all the cells containing the "-" and enter the "s around the time to allow the count function to work...? #or am i being stupid and is there a way to set up the count function to count the negative times as they are? Any help will be greatly appriciated Many thanks Sam -- SamGB ------------------------------------------------------------------------ SamGB's Profile: http://www.excelforum.com/member.php...o&userid=31263 View this thread: http://www.excelforum.com/showthread...hreadid=509343 -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Count Intervals of 2 Consecutive Values in same Row and Return Count across Row | Excel Worksheet Functions | |||
Count Position of Filtered TEXT cells in a column | Excel Worksheet Functions | |||
Count Position of Filtered TEXT cells in a column | Excel Worksheet Functions | |||
Conversion | Excel Worksheet Functions | |||
SUMPRODUCT Formula to Count Row of data Below Matched Criteria | Excel Worksheet Functions |