LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Wrestling with fractions and dates. Knowledge of photography is helpful.

I made a spreadsheet to combine f/stop, shutter speed, and film speed into a
single number. This number represents how many stops the exposure was taken
from a sunny 16 setting. For example, if I'm using ISO 100 film, a shutter
speed of 1/125 sec., and an f/stop of 11, it will calculate to about .8. Ok,
now for the fun part. When I enter a shutter speed into a cell, I just input
the denominator because all the numbers are just reciprocals of their
respective shutter speeds. For example, for 1/125 sec, I enter 125 and let
the inner workings take care of it. The problem is when the shutter speeds
are in the 1 second or more neighborhood, I have to be able to differentiate
between 1/4 of a second and 4 seconds. So I use the same syntax as what the
camera displays. 4 seconds is displayed as 4". For 7/10 of a second, the
display shows 0"7. For this type of format, I will just type 7/10 in the
cell. Here is the part of the equation that is messing up the works:

=IF(ISERROR(2*LOG(16/F40)/LOG(2)+LOG($C$2/E40)/LOG(2)),2*LOG(16/F40)/LOG(2)+LOG($C$2*(MID(E40,1,FIND("""",E40)-1)))/LOG(2),2*LOG(16/F40)/LOG(2)+LOG($C$2/E40)/LOG(2))

And just to simplify things, here is just the middle part of the expression
which does the evalutation when the quote sign is present:
2*LOG(16/F40)/LOG(2)+LOG($C$2*(MID(E40,1,FIND("""",E40)-1)))/LOG(2)

F40 is the f/stop
E40 is the shutter speed
C2 is the ISO of the film.

Now when this function evaluates to an error because of the quote sign in
the cell, it takes the alternate path of extracting the numbers before the
quote sign. But if the number is 7/10", or 7/10 of a second, Excel is
interpreting this as a date and the output is not as expected. If I format
the cell as a fraction, it doesn't matter. I'm not sure why Excel even
accepts the fraction format when 7/10" isn't a fraction anyway. Any ideas
how to set this matter straight?

Thanks for your replies.

David Farber
L.A., CA


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
stop fractions changing to dates John Excel Discussion (Misc queries) 1 August 5th 09 03:31 AM
calculate fractions using dates lemonscented Excel Worksheet Functions 6 April 29th 09 07:57 PM
fractions in forms & cells (not DATES & Decimals) T_o_n_y Excel Programming 1 February 27th 07 02:15 AM
Fractions show as dates ross Excel Discussion (Misc queries) 6 March 10th 06 03:32 PM
How can I automate a 16 man wrestling bracket in Excell. Bob Imhof Excel Worksheet Functions 1 January 12th 05 06:43 PM


All times are GMT +1. The time now is 08:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"