Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
Esaam
 
Posts: n/a
Default question driving me nuts

Okay...I never thought I would ever have to use excel again. Lo and behold, I
am now the owner of a business and have forgotten how to do some things. I
know how to create formaulas for adding and stuff. I forgot how to make my
calculatons so that my deposit would be broken down. For example say I have 5
of each dollar denomination (1,2,5,10,20,50,100) and coin (1,5,10,25,50,$1).
My deposit has to be 790 (5 of each denomination-150).

What I want my sheet to do is tell me how much of each denomination I should
pull out in terms of numbers instead of dollar amount. For exaple instead of
telling me to pull $790 I want it to tell me to pull 5-$100 bills 5-$50 bills
and 4-10 bills. Basically breaking down my cash with the largest possible
denomination until there can be no more. Any help would be deeply appreciated.
  #2   Report Post  
Posted to microsoft.public.excel.newusers
 
Posts: n/a
Default question driving me nuts

Please do not duplicate posting in multiple groups. If
you "must", do so only if your news reader allows you
to crosspost. (I do not see any way to do that with
Microsoft "community newsgroups".)

See responses in the Microsoft group Excel General
Questions, aka the newsgroup microsoft.public.excel.misc.
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Chip Pearson
 
Posts: n/a
Default question driving me nuts

Try code like the following:

Dim Amount As Integer
Dim Num100 As Integer
Dim Num50 As Integer
Dim Num20 As Integer
Dim Num10 As Integer
Dim Num5 As Integer
Dim Num1 As Integer

Amount = 790 ' <<<< CHANGE
Num100 = Amount \ 100
Amount = Amount - (100 * Num100)
Num50 = Amount \ 50
Amount = Amount - (50 * Num50)
Num20 = Amount \ 20
Amount = Amount - (20 * Num20)
Num10 = Amount \ 10
Amount = Amount - (10 * Num10)
Num5 = Amount \ 5
Amount = Amount - (5 * Num5)
Num1 = Amount
Debug.Print Num100, Num50, Num20, Num10, Num5, Num1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Esaam" wrote in message
...
Okay...I never thought I would ever have to use excel again. Lo
and behold, I
am now the owner of a business and have forgotten how to do
some things. I
know how to create formaulas for adding and stuff. I forgot how
to make my
calculatons so that my deposit would be broken down. For
example say I have 5
of each dollar denomination (1,2,5,10,20,50,100) and coin
(1,5,10,25,50,$1).
My deposit has to be 790 (5 of each denomination-150).

What I want my sheet to do is tell me how much of each
denomination I should
pull out in terms of numbers instead of dollar amount. For
exaple instead of
telling me to pull $790 I want it to tell me to pull 5-$100
bills 5-$50 bills
and 4-10 bills. Basically breaking down my cash with the
largest possible
denomination until there can be no more. Any help would be
deeply appreciated.



  #4   Report Post  
Posted to microsoft.public.excel.newusers
Esaam
 
Posts: n/a
Default question driving me nuts

i was trying it out, do ihave to precede eac statement with an equal sign. i
would appreciate it if you could tell me how to enter this. i.e, in one cell,
across multiple cells

"Chip Pearson" wrote:

Try code like the following:

Dim Amount As Integer
Dim Num100 As Integer
Dim Num50 As Integer
Dim Num20 As Integer
Dim Num10 As Integer
Dim Num5 As Integer
Dim Num1 As Integer

Amount = 790 ' <<<< CHANGE
Num100 = Amount \ 100
Amount = Amount - (100 * Num100)
Num50 = Amount \ 50
Amount = Amount - (50 * Num50)
Num20 = Amount \ 20
Amount = Amount - (20 * Num20)
Num10 = Amount \ 10
Amount = Amount - (10 * Num10)
Num5 = Amount \ 5
Amount = Amount - (5 * Num5)
Num1 = Amount
Debug.Print Num100, Num50, Num20, Num10, Num5, Num1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Esaam" wrote in message
...
Okay...I never thought I would ever have to use excel again. Lo
and behold, I
am now the owner of a business and have forgotten how to do
some things. I
know how to create formaulas for adding and stuff. I forgot how
to make my
calculatons so that my deposit would be broken down. For
example say I have 5
of each dollar denomination (1,2,5,10,20,50,100) and coin
(1,5,10,25,50,$1).
My deposit has to be 790 (5 of each denomination-150).

What I want my sheet to do is tell me how much of each
denomination I should
pull out in terms of numbers instead of dollar amount. For
exaple instead of
telling me to pull $790 I want it to tell me to pull 5-$100
bills 5-$50 bills
and 4-10 bills. Basically breaking down my cash with the
largest possible
denomination until there can be no more. Any help would be
deeply appreciated.




  #5   Report Post  
Posted to microsoft.public.excel.newusers
Andy
 
Posts: n/a
Default question driving me nuts

That is VB code that needs to be entered into the VB Editor within Excel
ToolsMacrosVisual Basic Editor

Chip has just given you the basis of what you need for you to tweak etc.
(I think). Entering this into cells will not help. What you are trying
to do would require code as far as I can tell rather than formulas
entered into the cells..

Esaam wrote:
i was trying it out, do ihave to precede eac statement with an equal sign. i
would appreciate it if you could tell me how to enter this. i.e, in one cell,
across multiple cells

"Chip Pearson" wrote:


Try code like the following:

Dim Amount As Integer
Dim Num100 As Integer
Dim Num50 As Integer
Dim Num20 As Integer
Dim Num10 As Integer
Dim Num5 As Integer
Dim Num1 As Integer

Amount = 790 ' <<<< CHANGE
Num100 = Amount \ 100
Amount = Amount - (100 * Num100)
Num50 = Amount \ 50
Amount = Amount - (50 * Num50)
Num20 = Amount \ 20
Amount = Amount - (20 * Num20)
Num10 = Amount \ 10
Amount = Amount - (10 * Num10)
Num5 = Amount \ 5
Amount = Amount - (5 * Num5)
Num1 = Amount
Debug.Print Num100, Num50, Num20, Num10, Num5, Num1


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Esaam" wrote in message
...

Okay...I never thought I would ever have to use excel again. Lo
and behold, I
am now the owner of a business and have forgotten how to do
some things. I
know how to create formaulas for adding and stuff. I forgot how
to make my
calculatons so that my deposit would be broken down. For
example say I have 5
of each dollar denomination (1,2,5,10,20,50,100) and coin
(1,5,10,25,50,$1).
My deposit has to be 790 (5 of each denomination-150).

What I want my sheet to do is tell me how much of each
denomination I should
pull out in terms of numbers instead of dollar amount. For
exaple instead of
telling me to pull $790 I want it to tell me to pull 5-$100
bills 5-$50 bills
and 4-10 bills. Basically breaking down my cash with the
largest possible
denomination until there can be no more. Any help would be
deeply appreciated.






Reply
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
question driving me nuts Esaam Excel Discussion (Misc queries) 3 December 1st 05 06:03 PM
How do I find and replace a question mark in Excel? Ranpalandil Excel Discussion (Misc queries) 1 September 7th 05 10:20 PM
Sum and Count are driving me nuts!! Mattrapps Charts and Charting in Excel 1 May 9th 05 07:08 PM
Driving me nuts. Need more nested than 7 Stressed Excel Discussion (Misc queries) 5 April 12th 05 06:20 PM
Excel / VB is driving me nuts!! Andrew Excel Worksheet Functions 2 November 29th 04 04:06 AM


All times are GMT +1. The time now is 08:34 AM.

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"