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: 25
Default VBA to calculate charges

Hi,
I'm new to Excel programming and would like some tip on how to calculate a
simple charge using vba.

Scenario:
For 100 unit and below, use $0.10 per unit
For 101 to 200 unit, use $0.15 per unit
For 201 and above, use $0.20 per unit

If I set cell A1 "Unit" to 150, then first 100=$10, plus next 50unit=$7.50

So cell B1 to show $7.50 as "Charges".

How do I code using vba?

Or is there a easier way, e.g using formula in worksheet without using vba
at all?

Thank you.
 
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
Calculate finance charges WINDMILL Excel Discussion (Misc queries) 1 November 30th 09 08:23 PM
How to change hours and minutes to calculate charges? E. Lewis Excel Discussion (Misc queries) 1 September 21st 07 09:32 AM
formula calculate charges based on hours Pammy Excel Discussion (Misc queries) 1 September 4th 07 07:54 PM
formula to calculate total rent charges Narnimar Excel Discussion (Misc queries) 4 July 9th 07 08:26 PM
How do I calculate charges based on elasped time(H:MM) & rate($)? glass-artist-web-developer Excel Discussion (Misc queries) 1 March 12th 05 02:09 AM


All times are GMT +1. The time now is 07: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"