Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-24-2008, 03:15 PM
J.W. Aldridge
 
Posts: n/a
Results of formula vs real numbers

HI.

How do you change a formula to read the value as a result of a formula
and not necessarily as a real number?

Example:

In G6, i have the following formula that gives me the hour of a time
in F6

=IF(F6>0,MOD(F6-"1:00",1),"")

F6 contains 00:30:08, The result is 23

In another cell, I am using this formula, but it doesnt recognize the
23.

=SUMPRODUCT(--(B6:B58331="james"),--(G6:G58331="23"))

The 23 is actually the HOUR of time so it isn't a whole number or real
number persay. It is a rounded time to the hour.
Reply With Quote
  #2 (permalink)  
Old 07-24-2008, 03:25 PM
Pete_UK
 
Posts: n/a
Re: Results of formula vs real numbers

Yes, but it isn't a text value so putting quotes around it in your SP
formula won't work. Try it like this:

=SUMPRODUCT(--(B6:B58331="james"),--(G6:G58331=23/24))

as Excel stores times as fractions of a 24-hour day.

Hope this helps.

Pete

On Jul 24, 4:15*pm, "J.W. Aldridge" <jeremy.w.aldri...@gmail.com>
wrote:
> HI.
>
> How do you change a formula to read the value as a result of a formula
> and not necessarily as a real number?
>
> Example:
>
> In G6, i have the following formula that gives me the hour of a time
> in F6
>
> =IF(F6>0,MOD(F6-"1:00",1),"")
>
> F6 contains 00:30:08, *The result is 23
>
> In another cell, I am using this formula, but it doesnt recognize the
> 23.
>
> =SUMPRODUCT(--(B6:B58331="james"),--(G6:G58331="23"))
>
> The 23 is actually the HOUR of time so it isn't a whole number or real
> number persay. It is a rounded time to the hour.


Reply With Quote
  #3 (permalink)  
Old 07-24-2008, 03:28 PM
Peo Sjoblom
 
Posts: n/a
Re: Results of formula vs real numbers

First of all this part

--(G6:G58331="23"))

looks for a text representation of 23, remove the quotations
if G6:G58331 have numbers. Secondly your formula

=IF(F6>0,MOD(F6-"1:00",1),"")

returns

23:30 and furthermore it is a time value so the real number is

0.979259259259259

so if you have 23 in the range you are testing for it will obviously not be
a match

If you have integers in G6:G58331 then you can use


=--TEXT(IF(F6>0,MOD(F6-"1:00",1),""),"h")




--


Regards,


Peo Sjoblom

"J.W. Aldridge" <jeremy.w.aldridge@gmail.com> wrote in message
news:e80b9f1f-3bd4-4f2d-8a4e-d5158e3bf399@c58g2000hsc.googlegroups.com...
> HI.
>
> How do you change a formula to read the value as a result of a formula
> and not necessarily as a real number?
>
> Example:
>
> In G6, i have the following formula that gives me the hour of a time
> in F6
>
> =IF(F6>0,MOD(F6-"1:00",1),"")
>
> F6 contains 00:30:08, The result is 23
>
> In another cell, I am using this formula, but it doesnt recognize the
> 23.
>
> =SUMPRODUCT(--(B6:B58331="james"),--(G6:G58331="23"))
>
> The 23 is actually the HOUR of time so it isn't a whole number or real
> number persay. It is a rounded time to the hour.



Reply With Quote
  #4 (permalink)  
Old 07-24-2008, 04:41 PM
J.W. Aldridge
 
Posts: n/a
Re: Results of formula vs real numbers

Got info from both suggestions....
Working purfectly now.

Thanx!
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Excel


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:04 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109