View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Mifty Mifty is offline
external usenet poster
 
Posts: 99
Default Formula help Mod and square

Thank you Bernard,

In a very befuddled way I'm trying to work out what they are trying to do
but it's just giving me a headache at the moment.

Maybe you or Mike would be able to work it out if I gave you the next one :-)

=IF(LEN(F13)=8,(IF(I13=1,-75.622,IF(J13 = 1, -24.226,0))),"")


F13 = date ddmmyyyy I13=IF(H13(2004-2)*100+9,1,0)
J13 = =IF(H139+100*(2006-5),IF(G13<7,1,IF(G139,1,0)),0)

G13 = F13 as value
H13 = Lookup returning a value from 0-1

I think what they are trying to do is assign a value to date differences
through the year but there must be an easier way.

Could they have used datedif and then a lookup I wonder?

Do you think the 2 formulae using MOD were so that they could do
calculations with dates as Excel numbers and Years e.g. 2006 (J13)? Would it
not have been easier to use a specific date in 2006 and use the excel date to
do calcs?

Confused .......
--
Mifty


"Bernard Liengme" wrote:

Let's look at the first
Suppose F13 hole 12345678
MOD(F13,10^6) says divide F13 by 1 million and return the remainder: you get
345678
MOD(F13,10^4) says divide F13 by 10,000 and return the remainder; you get
5678
The we subtract to get 340000; then divide by 10,000 to get 34

In the second one we find MOD(F13,10^4) again = 5678
Multiply by 100: 567800

Then we add this to the first answer: 567834

Not sure why you would want this but that is what they do

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Mifty" wrote in message
...
Hi everyone,

Is there any chance that some kind soul could tell me what these 2
formulae
are doing please?

F13 is a date

=(MOD(F13,10^6)-MOD(F13,10^4))/10000

=(MOD(F13,10^6)-MOD(F13,10^4))/10000+MOD(F13,10^4)*100

Thank you very much





--
Mifty