MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Mar 15th, 2002, 09:17 AM   #1
rickeyjt
New Member
 
Join Date: Mar 2002
Location: Rick Trankle
Posts: 8
Default

I am trying to calculate seconds and frames for music. Each second is divided into 75 (0-74). Left of the decimal point is seconds, right of the decimal point is frame number. I want to add, subtract or multiply, e.g., 2.45 + 5.65 with a one step formula. Then also take total number of frames and convert back to seconds.frames.

2x75=150+45=195 + 5x75=375+65=440 =
635 (total frames) /75 = 8 seconds ???frames
8x75=600
635-600=35
8.35 (What formula to get this number?)

[ This Message was edited by: rickeyjt on 2002-03-15 08:20 ]
rickeyjt is offline   Reply With Quote
Old Mar 15th, 2002, 09:53 AM   #2
Steve Hartman
Board Regular
 
Steve Hartman's Avatar
 
Join Date: Feb 2002
Location: Houston,Texas
Posts: 418
Default

Quote:
On 2002-03-15 08:17, rickeyjt wrote:
I am trying to calculate seconds and frames for music. Each second is divided into 75 (0-74). Left of the decimal point is seconds, right of the decimal point is frame number. I want to add, subtract or multiply, e.g., 2.45 + 5.65 with a one step formula.
To make sure I understand your example, 2.45 is 2 and 45/75 seconds and 5.65 is 5 and 65/75 seconds?
Steve Hartman is offline   Reply With Quote
Old Mar 15th, 2002, 10:02 AM   #3
rickeyjt
New Member
 
Join Date: Mar 2002
Location: Rick Trankle
Posts: 8
Default

Right. The number to the right of the decimal point can only go up to 74. Then the seconds will increment 1 and the number to the right of the decimal point will be 0.
rickeyjt is offline   Reply With Quote
Old Mar 15th, 2002, 10:21 AM   #4
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Total frames can be calculated using the array formula...

{=SUM(TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)}

...where A1:A2 contains {2.45;5.65}.

Note: Array formulas must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula.

With the Total frames formula in C1 your 'seconds.frames' value can be calculated using...

=TRUNC(C1/75)+MOD(C1/75,1)*0.75

[ This Message was edited by: Mark W. on 2002-03-15 09:23 ]
Mark W. is offline   Reply With Quote
Old Mar 15th, 2002, 10:59 AM   #5
rickeyjt
New Member
 
Join Date: Mar 2002
Location: Rick Trankle
Posts: 8
Default

Quote:
On 2002-03-15 09:21, Mark W. wrote:

{=SUM(TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)}

...where A1:A2 contains {2.45;5.65}.

How do I get the difference A2-A1?

With the Total frames formula in C1 your 'seconds.frames' value can be calculated using...

=TRUNC(C1/75)+MOD(C1/75,1)*0.75

This part is great because now it's easy to convert total frame numbers to sec.fr.

[ This Message was edited by: Mark W. on 2002-03-15 09:23 ]
rickeyjt is offline   Reply With Quote
Old Mar 15th, 2002, 11:08 AM   #6
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-03-15 09:59, rickeyjt wrote:
{=SUM(TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)}

...where A1:A2 contains {2.45;5.65}.

How do I get the difference A2-A1?
{=SUM((TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)*{-1;1})}

Note: This is an array formula which must be entered using the Control+Shift+Enter key combination. The outermost braces, { }, are not entered by you -- they're supplied by Excel in recognition of a properly entered array formula.
Mark W. is offline   Reply With Quote
Old Mar 15th, 2002, 11:56 AM   #7
rickeyjt
New Member
 
Join Date: Mar 2002
Location: Rick Trankle
Posts: 8
Default

Quote:
On 2002-03-15 10:08, Mark W. wrote:
Quote:
How do I get the difference A2-A1?
{=SUM((TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)*{-1;1})}
The above yields a 0 answer.
rickeyjt is offline   Reply With Quote
Old Mar 15th, 2002, 12:06 PM   #8
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-03-15 10:56, rickeyjt wrote:
Quote:
On 2002-03-15 10:08, Mark W. wrote:
Quote:
How do I get the difference A2-A1?
{=SUM((TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)*{-1;1})}
The above yields a 0 answer.
Only if you fail to enter using Control+Shift+Enter as recommended in my note.

[ This Message was edited by: Mark W. on 2002-03-15 11:07 ]
Mark W. is offline   Reply With Quote
Old Mar 15th, 2002, 12:07 PM   #9
lenze
MrExcel MVP
 
lenze's Avatar
 
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
Default

You can also use the DOLLARDE() and DOLLARFR() functions.

If you have a cell(A1) with 8.45 (8 seconds and 45 frames), DOLLARDE(A1,75) will convert it to a decimal equivalent (i.e. 8.6), which you can use in normal math operations. If your result is in cell(C1), you can convert it back with DOLLARFR(C1,75)

[ This Message was edited by: lenze on 2002-03-15 11:11 ]

[ This Message was edited by: lenze on 2002-03-15 11:12 ]
lenze is offline   Reply With Quote
Old Mar 15th, 2002, 12:22 PM   #10
rickeyjt
New Member
 
Join Date: Mar 2002
Location: Rick Trankle
Posts: 8
Default

Quote:
{=SUM((TRUNC(A1:A2)*75+MOD(A1:A2,1)*100)*{-1;1})}
The above yields a 0 answer.

Only if you fail to enter using Control+Shift+Enter as recommended in my note.
I did use ctrl-shft-ent. I copied the formula (minus {} outside braces). My cell positions are F2:G2, that's the only difference.
rickeyjt is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 01:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes