Thread: Format problem
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sapphyre Sapphyre is offline
external usenet poster
 
Posts: 20
Default Format problem

Thanks for the reply Richard. Ok I looked in my when I click on a cell in J
Sheet1 and it has my formula =H2-G2 and is formatted [mm]. I don't see
anything to make me think it is date formatted. I've tried changing the
format and it doesn't work for that column. I had to format it this way so
that it would calculate the subtraction of the Date/Time in columns H and G
correctly, because sometimes it is over 24 hours and sometimes crosses
midnight.

Anyway, let me show you how I have it set up.
Sheet1:

G H I J
Started Ended Length TTL Min
08/19/07 22:30 8/20/07 07:30 0 days 09:00 540

G: formatted mm/dd/yy hh:mm
H: formatted mm/dd/yy hh:mm
I: formula =H2-G2 formatted d "days" hh:mm
J: formula =H2-G2 formatted [mm]

Sheet2 column B: What I want here is for it to calculate the number of
accurances of specific minutes. I use to have it set up like this and it
worked, until I changed J format to [mm].
=COUNTIF(Sheet1!J2:J2500,"01")
I have tried different formats and formulas, but nothing seems to work in
this column. Could anyone come up with a formula to put here that would work
for me?

Thanks



"richard" wrote:

If you look in the formula bar of any of the cells in Sheet 1 column J you
may see that by formatting the cell to (MM) you have converted the 01 data to
a date which is now represented as 01/01/1900, therefore your formula which
is looking for instances of 01 will find nothing, play with the format of
column J or alter the formula in sheet 2 thro 60 to look for the appropriate
date



"Sapphyre" wrote:

Ok, I finally got a formula/format to work for subtracting my date/time
columns and my total minutes column on my main sheet1. On another sheet
within my workbook I calculate different information that I get from my main
sheet.

This is how I use to have my sheet2 column B
=COUNTIF(Sheet1!J2:J2500,"01") formatted-General
This would calculate how many times column J from Sheet1 had a 01 occurance.
I did this all the way through 60.
But now that I have changed my sheet1 J column with this formula
=H2-G2 and formatted [mm] it won't calculate on my sheet2 right anymore
useing that above formula/format. I've tried formatting the sheet2 column B
with [mm] but that doesn't work either.

It's like I fix one problem (subtracting date/times <,=,24 hours) and
created a new problem :(.

It would be most appreciated if someone could help me with this.

Thank you so much,
Sapphyre